Jumat, 30 Januari 2015

Re: [MS_AccessPros] Date question

Duh. And to extract the month, it must be:

RecDate: CDate(Left (dbo_person, 4), & "-" & Mid (dbo_person, 3, 2) & "-" & Right(dbo_person, 2))

Is dbo_person the name of a field containing a date in format yyyymmdd? That doesn't seem to be a reasonable name for a date field - in fact, it sounds like it is the name of a table.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)




On Jan 30, 2015, at 5:08 PM, Steve Conklin StephenMConklin@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Patty:

Your MID portion needs another argument, Mid needs the starting position and the number of characters, so try:


RecDate: CDate(Left (dbo_person, 4), & "-" & Mid (dbo_person, 2, 2) & "-" & Right(dbo_person, 2))


hth,

Steve Conklin





________________________________
> To: MS_Access_Professionals@yahoogroups.com
> From: MS_Access_Professionals@yahoogroups.com
> Date: Fri, 30 Jan 2015 08:02:12 -0800
> Subject: Re: [MS_AccessPros] Date question
>
>
>
> I typed the following but getting error message. Can you help me find
> problem?
>
> RecDate: CDate(Left (dbo_person, 4), & "-" & Mid (dbo_person, 2) & "-"
> & Right(dbo_person, 2))
>
> Error says the expression you entered has an invalid . (Dot) or !
> operator or invalid parenthesis
>
> Thank you so much
>
>

------------------------------------

------------------------------------


------------------------------------

Yahoo Groups Links







------------------------------------

------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/

Tidak ada komentar:

Posting Komentar