Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Date format

Quote Reply
Date format
Hi,
how can i change the date display format from yyyy-mm-dd to dd.mm.yyyy and make the input robust to different formats (like d.m.yy and d.m.yyyy and dd.mm.yyyy etc).
Any available tricks in dbman 2.0?

Henning


Quote Reply
Re: [ktt] Date format In reply to
Hi Henning,
You can use :
my $new_format = GT::Date::date_transform($old_format,'%yyyy%-%mm%-%dd%','%dd%.%mm%.%yyyy%') ;
to change the date display format as your desire.
Regards,
doublemint

Quote Reply
Re: [doublemint] Date format In reply to
Ok,

that would help to display in the right format.
This would do it in templates:
Code:
<%GT::Date::date_transform($old_format,'%yyyy%-%mm%-%dd%','%dd%.%mm%.%yyyy%')%>
But what should i do, to make forms to accaept this format as input without the need to hack the code.

Iwould prefer changing templates or definition files.

Henning