Format Date #\/#\/#

N

NikkiB

I am trying to use a function that I have used in the past but for some
reason today when I type it in the query field and run my report Access is
converting "####/##/##" to #\/#\/# and I receive an error message in that
field for my query results.

The function I am trying to use is:
CVDate(Format([LSAB_FIRST_CYMD],"####/##/##")) but it keeps automatically
changeing my format value to the following:
CVDate(Format([LSAB_FIRST_CYMD],"#\/#\/#"))

Any suggestions would be greatly appreciated.

Thank you for your time,
Nikki
 
N

NikkiB

Thanks for the input but that didn't work either. But...OMG! for some reason
when I JUST typed "####/##/##" it worked this time!

I have no idea why it was getting tripped up before but I'm happy to see it
is working correctly now. I guess I will close this mysterious post.

I appreciate your time.

Nikki

Douglas J. Steele said:
Try

"yyyy\/mm\/dd"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


NikkiB said:
I am trying to use a function that I have used in the past but for some
reason today when I type it in the query field and run my report Access is
converting "####/##/##" to #\/#\/# and I receive an error message in that
field for my query results.

The function I am trying to use is:
CVDate(Format([LSAB_FIRST_CYMD],"####/##/##")) but it keeps automatically
changeing my format value to the following:
CVDate(Format([LSAB_FIRST_CYMD],"#\/#\/#"))

Any suggestions would be greatly appreciated.

Thank you for your time,
Nikki
 
D

Douglas J. Steele

Is LSAB_FIRST_CYMD a Date field, or is it strictly a Text field you're
trying to format as a date?

If it's a date field, you definitely should have the yyyy, mm and dd there.
If it's a text field, # is all you need.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


NikkiB said:
Thanks for the input but that didn't work either. But...OMG! for some
reason
when I JUST typed "####/##/##" it worked this time!

I have no idea why it was getting tripped up before but I'm happy to see
it
is working correctly now. I guess I will close this mysterious post.

I appreciate your time.

Nikki

Douglas J. Steele said:
Try

"yyyy\/mm\/dd"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


NikkiB said:
I am trying to use a function that I have used in the past but for some
reason today when I type it in the query field and run my report Access
is
converting "####/##/##" to #\/#\/# and I receive an error message in
that
field for my query results.

The function I am trying to use is:
CVDate(Format([LSAB_FIRST_CYMD],"####/##/##")) but it keeps
automatically
changeing my format value to the following:
CVDate(Format([LSAB_FIRST_CYMD],"#\/#\/#"))

Any suggestions would be greatly appreciated.

Thank you for your time,
Nikki
 
Top