convert unix timestamp to Texis date

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

convert unix timestamp to Texis date

Post by aitchon »

How would I go about converting a date in unix time to a date in Texis?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

convert unix timestamp to Texis date

Post by Kai »

Use convert(). Depending on the date format, that should do it. Try <$texisTime = (convert($unixTimeString, 'date' ))>.
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

convert unix timestamp to Texis date

Post by aitchon »

Getting an "out of range" error:

<$unixtimestamp="1374503628">
<$convdate=(convert($unixtimestamp, 'date'))>
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

convert unix timestamp to Texis date

Post by mark »

Try converting to long first
convert(convert($unixtimestamp, 'long' ), 'date' )
aitchon
Posts: 118
Joined: Mon Jan 22, 2007 10:30 am

convert unix timestamp to Texis date

Post by aitchon »

Thanks, that worked.
Post Reply