Convert Date

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

Our DB2 tables has the create date field data type as "text" with the
yyyymmdd format. I'm trying to convert to mm/dd/yyyy; but also need to change
it to date/time data type so I can link to another table.

Any suggestions?

Thanks
Jennifer
 
Jennifer said:
Our DB2 tables has the create date field data type as "text" with the
yyyymmdd format. I'm trying to convert to mm/dd/yyyy; but also need to change
it to date/time data type so I can link to another table.


DateSerial(Val(Left(CreateDate,4)),
Val(Mid(CreateDate,5,2)), Val(Right(CreateDate,2)))

The display format you want can be specified wherever you
want to dissplay the date/time.

Note that the time part will be midnight so It's not at all
clear how that can be needed in a link to another table.
 
Back
Top