[Canberra-pm] configuring ISO 8601 date output using Template module

John.Hockaday at ga.gov.au John.Hockaday at ga.gov.au
Tue Feb 6 14:41:22 PST 2007


Alex and Nick,

I tried what Alex suggested and it worked.  I processed the date into ISO
8601 using Date::Calc and then pushed the results back into the hash that I
got from my SQL to the database.  This hash was then the data source for the
Template package.

Thanks to both of your for your prompt and very useful responses.

Thanks.


John

-----Original Message-----
From: canberra-pm-bounces+john.hockaday=ga.gov.au at pm.org
[mailto:canberra-pm-bounces+john.hockaday=ga.gov.au at pm.org] On Behalf Of Alex
Satrapa
Sent: Tuesday, 6 February 2007 2:11 PM
To: canberra-pm at pm.org
Subject: Re: [Canberra-pm] configuring ISO 8601 date output using
Templatemodule


On 06/02/2007, at 13:07 , <John.Hockaday at ga.gov.au> wrote:


The trouble is that the LASTUPDATE date (Oracle RDBMS) is in the form
DD-MON-YYYY  whereas I want ISO 8601 format like YYYY-MM-DD.


By the time you get it, you've got a string like '12-Mar-2004', is that
right?


My suggestion would be to find out how to get the data from Oracle in the
form that you want - if this is under your control, all well and good :) I
don't know Oracle (despite being trained on in about 15 years ago), but under
PostgreSQL you'd do this:


select to_char(lastupdate, 'YYYY-MM-DD'), ... from ...


HTH
alex


More information about the Canberra-pm mailing list