Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Formatting Date_Checked

Quote Reply
Formatting Date_Checked
In links.html, I would like to replace Added: <%Add_Date%> with Checked: <%Date_Checked%>,
but the default installation formats Date_Checked like this "2001-10-09 00:00:00"

Anyone know how I can apply date_user_format to Date_Checked?

Last edited by:

YoYoYoYo: Oct 9, 2001, 2:08 AM
Quote Reply
Re: [YoYoYoYo] Formatting Date_Checked In reply to
Hi,

You can do:

Date Checked: <%GT::Date::transform ($Date_Checked, '%yy%-%mm%-%dd% %hh%:%mm%:%ss%', 'your format here')%>

to change the date from what format to another.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Getting closer In reply to
OK. I put in this as the replacement format: '%dd%-%mmm%-%yyyy%'
Should display 09-Oct-2001

But I get this error
Quote:
Error: Unable to load module: GT::Date. Reason:
Error: No subroutine 'transform' in 'GT::Date',
Can't locate GT.pm in @INC (@INC contains: <PATH_TO>/cgi-bin/dir /usr/local/lib/perl5/5.6.0/i386-freebsd /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i386-freebsd /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at <PATH_TO>/cgi-bin/dir/GT/Template.pm line 971.

Tried changing to <%GT::Date::_transform ...
but I got this format : 2001-10-09

Tried changing to <%GT::Date::date_transform ...
Now the format is right, but the date is two months out: 09-Dec-2001 instead of 09-Oct-2001
(I checked that the date really is 09-Oct-2001)