Gossamer Forum
Home : Products : DBMan : Customization :

Calculating Dates

Quote Reply
Calculating Dates
I'm trying to add a field that will calculate the current day and and X number of days to it and store it in the database.

In sub add_record after
$status = &validate_record;

I put in
&calc_date


Subroutine as follows.

sub calc_date
{
$in{'Expdate'} = &get_date ( &date_to_unix ($in{'Date'}) + ($in{'Days'} * 86400);
}

It returns the current date.

What am I missing?


Thanks
Subject Author Views Date
Thread Calculating Dates Dan Wheeler 4230 Mar 24, 2000, 5:09 PM
Post Re: Calculating Dates
StevePlant 4129 Mar 24, 2000, 5:23 PM
Post Re: Calculating Dates
JPDeni 4149 Mar 24, 2000, 7:30 PM
Thread Re: Calculating Dates
Dan Wheeler 4158 Mar 25, 2000, 7:59 AM
Thread Re: Calculating Dates
keienb 4125 Jan 2, 2001, 8:42 PM
Thread Re: Calculating Dates
LoisC 4099 Jan 3, 2001, 1:03 PM
Thread Re: Calculating Dates
keienb 4079 Jan 3, 2001, 1:38 PM
Thread Re: Calculating Dates
LoisC 4093 Jan 4, 2001, 8:00 AM
Post Re: Calculating Dates
keienb 4093 Jan 4, 2001, 8:51 AM
Thread Re: Calculating Dates
keienb 4071 Jan 4, 2001, 10:59 AM
Thread Re: Calculating Dates
LoisC 4038 Jan 5, 2001, 10:55 AM
Post Re: Calculating Dates
keienb 4011 Jan 5, 2001, 6:50 PM