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
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