date conversion

Post Reply
aitchon
Posts: 119
Joined: Mon Jan 22, 2007 10:30 am

date conversion

Post by aitchon »

I'm trying to convert date using the following:

<$olddate="1967-02-01">
<$newdate=(convert($olddate, 'date'))>

But I get this error: Date 1967-02-01 is invalid/out of range

Can this convert be used on older dates?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

date conversion

Post by mark »

The "date" type is limited in range to dates between 1970 and 2038. For dates outside of that range you'll need to use a "long" type field and store them as integers of the form YYYYMMDD.
Post Reply