Re: [Templates] mysql date parsing

[prev] [thread] [next] [Date index for 2004/07/01]

From: Dennis Daupert
Subject: Re: [Templates] mysql date parsing
Date: 13:52 on 01 Jul 2004

>>I need to display date stored in mysql in more human readable
>>form than: 20040628192733

>I've found the standard "Date" plugin to work just fine for that.
>See perldoc Template::Plugin::Date

Thanks for the assist, Brett and Simon!

After a bit of fooling around, I can't seem to feed the timestamp
stored in mysql to Date plugin.

In my application, I do a query of table app, get the value for
mysql timestamp stored in the field 'timestamp', and display that
value in [% app.timestamp %]. So far, so good.

I have tried various variations of the following code to coerce
Date to format the mysql time value. Here is one attempt:

[% app.timestamp %] = [% date.format( time = app.$timestamp, format =
'%Y:%m:%d') %]

But that code produces row after row like the following (I ran this
yesterday, hence the june 30 date):

20040628192733 = 2004:06:30
20040627124930 = 2004:06:30
20040628122646 = 2004:06:30

What am I doing wrong?

/dennis


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

(message missing)

Re: [Templates] mysql date parsing
Dennis Daupert 13:52 on 01 Jul 2004

Re: [Templates] mysql date parsing
Mark Mills 15:42 on 01 Jul 2004

Re: [Templates] mysql date parsing
Dennis Daupert 16:48 on 01 Jul 2004

Re: [Templates] mysql date parsing
Mark Mills 17:56 on 01 Jul 2004

Re: [Templates] mysql date parsing
Dennis Daupert 18:38 on 01 Jul 2004

Re: [Templates] mysql date parsing
Mark Mills 18:54 on 01 Jul 2004

Re: [Templates] mysql date parsing
Dennis Daupert 20:00 on 01 Jul 2004

Re: [Templates] mysql date parsing
Dennis Daupert 20:17 on 01 Jul 2004

Re: [Templates] mysql date parsing
Mark Fowler 10:06 on 15 Jul 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52