Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [donm] Query help?: Edit Log

Here is the list of edits for this post
Re: [donm] Query help?
Hi,
You can write a simple function like below and put it into the global :
Code:
sub {
my $tags = shift;
if ($tags->{Member} eq 'No') {
my $today = GT::Date::date_get();
my $days_used = GT::Date::date_diff($today,$tag->{date_registered}) ;
return ($days_used < 30)?'Your account will expire in '.(30-$days_used).' days':'Your account has expired';
}
return;
}
I am not sure what value you put in your "date_exp" field but you can change "date_registered" field a little bit.

Also, you can do the same thing with SQL but I think using GT::Date is the best way in this case. Wink

Cheers,
jean@gossamer-threads.com

Last edited by:

jean: Nov 26, 2001, 4:39 PM

Edit Log: