Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Show month name

Quote Reply
Show month name
Hello

How can I display the date that a record was added like

17-01-2004 in this way 17, january 2004 ?

Thanks

Fábio
Quote Reply
Re: [assombracao] Show month name In reply to
Just simply create a global like:

sub {
my $val = shift;
require GT::Date;
my $unix_time = GT::Date::timelocal(GT::Date::parse_format($val, "%dd%-%mm%-%yyyy%"));
return GT::Date::date_get($unix_time, "%dd%, %MMM% %yyyy%");
}

Now you can use <%global_name($date_field)%>

Hope that helps.

TheStone.

B.