Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Last update - database

Quote Reply
Last update - database
Maybe a stupid question, but in DBMan, I use
Code:
<tr>
<td width="100%" align=center><BR><B><font face="Verdana,Arial,Helvetica" size="1">Database Last Updated: </B>$date</font></td>
</tr>


to display the date that the database was last updated. What do I use in DBMan SQL ? I have tried with <%date%> and <%time%>, but no result. Any idea ?
Luc Van Geyte
Quote Reply
Re: [Luc1] Last update - database In reply to
In this case, you have to create a global like:

sub {
my $format = shift || '%yyyy%-%mm%-%dd%';
require GT::Date;
return GT::Date::date_get(time, $format);
}

Now, you can use those tags below in the templates:
<%global_name('%mm%-%dd%-%yyyy%')%>: displays current day
<%global_name('%HH%:%MM%-%ss%')%>: displays current time

Hope that helps,

TheStone.

B.
Quote Reply
Re: [TheStone] Last update - database In reply to
globals is something new for me. I try this and give my answer later. Txs a lot....
Luc Van Geyte
Quote Reply
Re: [Luc1] Last update - database In reply to
Alex, this works and give the day of that moment. But how is it possible to get from the whole database, the date and time that the database was last updated ?

I have seen now how globals works. Fine ! This must give more possibilitys.



GT::Date gives the actual date ?
Luc Van Geyte

Last edited by:

Luc1: Oct 29, 2003, 10:22 AM