Gossamer Forum
Quote Reply
Date and Time format
Hi,

I use the below Global to fetch the date and time of the newest link added. I have a custom Field Add_Time that contains the date added in the format 0000-00-00 00:00:00 (like Date Checked) - and want to output the date in the same form as defined in date_user_format - but I want to add the time like HH:MM and tried several things but it does not seem to work??

If I remove the GT::Date::date_transform ... I get the time - but in the 0000-00-00 00:00:00 format - I want it as:


%dddd%, %mmmm% %dd% - %yyyy% at %hh%:%mm%


Any ideas?

Klaus


sub {
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY Add_Date DESC Limit 1');
$sth = $search_db->select ( { isValidated => 'Yes' });
while (my $link = $sth->fetchrow_hashref) {
$link->{Add_Time} = GT::Date::date_transform ($link->{Add_Time}, $CFG->{date_db_format}, $CFG->{date_user_format});
$output.=qq|$link->{Add_Time}|;
}
return $output;
}

http://www.ameinfo.com
Subject Author Views Date
Thread Date and Time format klauslovgreen 3774 Dec 26, 2002, 8:09 AM
Thread Re: [klauslovgreen] Date and Time format
yogi 3724 Dec 26, 2002, 12:39 PM
Thread Re: [yogi] Date and Time format
klauslovgreen 3678 Dec 27, 2002, 2:01 AM
Post Re: [klauslovgreen] Date and Time format
klauslovgreen 3463 Apr 11, 2003, 1:43 PM
Thread Re: [yogi] Date and Time format
klauslovgreen 3662 Dec 27, 2002, 7:39 AM
Thread Re: [klauslovgreen] Date and Time format
xpert 3643 Dec 27, 2002, 4:09 PM
Post Re: [xpert] Date and Time format
klauslovgreen 3643 Dec 27, 2002, 9:31 PM