Hi,
This definatly works:
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($today,$date);
return { diff => $diff };
}
Called with:
Code:
<%global_name($ID)%>..then print out <%diff%>
..so:
Code:
<%global_name($ID)%> Difference in days: <%diff%>
You can see it running here, with a hard-coded ID
http://www.myuksearch.co.uk/.../page.cgi?d=1;p=test
Out of interest, which template are you calling this in? You need to use it ONLY in link.html, or detailed.html (or category.html, inside the <%loop links_loop%> ..<%endloop%> section...)
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!