Format a date

S

SAC

I'm getting data from another computer and the dates are like this:

20050622

Do I have to parse the string and then put it back together or is there a
better was to handle it?

Thanks.
 
R

Rick Brandt

SAC said:
I'm getting data from another computer and the dates are like this:

20050622

Do I have to parse the string and then put it back together or is
there a better was to handle it?

Thanks.

I would use...

DateSerial(Left(YourField, 4), Mid(YourField, 5, 2), Right(YourField, 2))
 
Top