Page 1 of 1

date conversion

Posted: Fri Feb 01, 2008 1:58 pm
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?

date conversion

Posted: Fri Feb 01, 2008 2:46 pm
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.