Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Date Global Format

Quote Reply
Date Global Format
Halloos,

Looking at the 'date' global, I wonder how hard it to have the output not take its format from the LinksSQL system but rather in the format of: 110201 (mmddyy)

Here is the original code from globals:

sub {
# Displays the current date.
Links::init_date();
GT::Date::date_set_format($CFG->{'date_user_format'});
my $date = GT::Date::date_get();
GT::Date::date_set_format($CFG->{'date_db_format'});
return $date;
}
Quote Reply
Re: [Canoon] Date Global Format In reply to
Hi,

Can you not just go to Setup->Dates and change the user format there?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Date Global Format In reply to
Perhaps, but what uses this 'user' format. Is that used for <%Add_Date%> tags. If so, im not wanting to effect those.
Quote Reply
Re: [Canoon] Date Global Format In reply to
Hi,

Then you probably just want to do:

<%GT::Date::transform ($date, 'old format', 'new format')%>

in your template where 'date' is the template tag of the original date, old format is the format it's in, and new format is the new format you want to put it in.

Cheers,

Alex
--
Gossamer Threads Inc.