Hi,
Mmm.. i think the problem is arising with the format of $Add_Date (i.e its formatted like "March 10th, 2007" , instead of 2007-03-10).
my $date = $DB->table('Links')->select( ['Add_Date'], { ID => $_[0] } )->fetchrow;
my $today = GT::Date::date_get();
my $diff = GT::Date::date_diff($date,$today);
return { diff => $diff };
}
..then call with:
<%global_name($ID)%>
Does that do anything different?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Mmm.. i think the problem is arising with the format of $Add_Date (i.e its formatted like "March 10th, 2007" , instead of 2007-03-10).
Code:
sub { my $date = $DB->table('Links')->select( ['Add_Date'], { ID => $_[0] } )->fetchrow;
my $today = GT::Date::date_get();
my $diff = GT::Date::date_diff($date,$today);
return { diff => $diff };
}
..then call with:
<%global_name($ID)%>
Does that do anything different?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!