Format ([myDate], "Medium Date") sometimes works, often doesn't?

David Ball

Registered User.
Local time
Today, 16:16
Joined
Aug 9, 2010
Messages
230
Hi,

For various reasons I have to bring dates into my Table as Short Text and then convert them back to dates in my query.

I usually use:

Format ([myDate], "Medium Date")

The frustrating thing is that sometimes it works like a charm but often it doesn't.

Why? How can I get it to always works.

Thanks very much

Dave
 
Thanks RuralGuy, but I tried this and I still can't change my text to dates. It's driving me crazy!
 
Format returns a string. For Date data type use CDate().
 
Now I get date data type but it returns "error" for entries with no dates in them. This then crashes my report when I try to sort by date...

Is there a way to use CDate() and not get an error when there is no date entered (just a null)?

Thanks very much
 
You can test first with the IsDate() function.
 

Users who are viewing this thread

Back
Top Bottom