convert string to date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there.

I'm working with strings that have a date identifier within. The format of
the date is always like this - "20070316". I'm able to isolate this piece of
the text, but I need to format this to a day/month/year date. The month and
day part of the date will always be 2 digits. It actually has to be a date
value, not just a string that appears to be a date. I will be using these
dates later to find which string value was created earliest.

Any suggestions would be much appreciated!

Clint
 
Hi there.

I'm working with strings that have a date identifier within. The format of
the date is always like this - "20070316". I'm able to isolate this piece of
the text, but I need to format this to a day/month/year date. The month and
day part of the date will always be 2 digits. It actually has to be a date
value, not just a string that appears to be a date. I will be using these
dates later to find which string value was created earliest.

Any suggestions would be much appreciated!

Clint


[NewDateField] =
DateSerial(Left([FieldName],4),Mid([FieldName],5,2),Right([FieldName],2))
 
Back
Top