[ic] date format question

k palazani at gmx.net
Tue Jan 13 10:19:36 EST 2004

Mike Heins wrote:
> Quoting k (palazani at gmx.net):
>> Rene Hertell wrote:
>>>> Hi list,
>>>> I tried to format the last_login field of the UI access table to a
>>>> MYSQL valid value:
>>>> [convert-date ymt="%d-%m-%Y"]
>>>>     [data table=access field=last_login key='[data session
>>>> username]'] [/convert-date]
>>> I think it should be fmt="%d-%m-%Y".
>> Yes, you are right, it should be fmt.
>>> If you change the format to this, you wont get the time when the
>>> user logged in. The default value (epoch) is better in my opinion.
>>> That value you can format later to any format you want..
>> Here you are right again, but the conversion fails. In the access
>> table I have values like:
>>     1071675046
>> and formatting it now with the correct (fmt) above code snippet
>> (without time, only for test now) gives a wrong result:
>>     something with the year 1070 !?
> [convert-date] (as stated in its docs) converts an ISO date.

Yes the docs, sorry...
> You want:
> [time time="1071675046"]%d-%m-%Y[/time]
> That is a bad date format for the internet, by the way. It confuses
> non-Americans (as we are confused by %d/%m/%Y). It is better to
> use %d-%b-%Y.

Perfect, thanks a lot Mike! (the reformat is not for posting in a page)

More information about the interchange-users mailing list