Date Conversion

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

Guest

Hi,

I was wondering if anyone could help me??

I am trying to convert a field in my db from a text field to a date field
using the following expression:

CDate(format([warre],"Short Date")). The date is currently stored as 060401
but when i run the query with the above expression in I get an output of
14/05/65.

Please help!!

Many thanks.
 
Assuming that 060401 is 6th April 2001, you could try

DateSerial(right(warre,2), mid(warre,3,2), left(warre,2))

Hope This Helps
Gerald Stanley MCSD
 
If you wont get any other better answer then you can use that
CvDate(left("060401",2) & "/" & mid("060401",3,2) & "/" & right("060401",2))

replace the 060401 with the field name
 
If you wont get any other answer then you can try
CVDate(left([warre],2) & "/" & mid([warre],3,2) & "/" & right([warre],2))
 
Back
Top