converting string to date

  • Thread starter Thread starter Ron Berns
  • Start date Start date
R

Ron Berns

I am using Access 2003 and I am fairly new to programming.

I have a string of data and I would like to take the first 8 characters
and put them into a date field in a table. The first 8 characters are
all numbers and in the format of YYYYMMDD (20090428).

Thanks in advance.

Ron
 
I am using Access 2003 and I am fairly new to programming.

I have a string of data and I would like to take the first 8 characters
and put them into a date field in a table. The first 8 characters are
all numbers and in the format of YYYYMMDD (20090428).

Thanks in advance.

Ron

you have to parse out the chunks. Access stores dates as numbers...

DateSerial(Left$(strDate, 4), Mid$(strDate, 5, 2), Right$(strDate, 2))
 
Back
Top