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
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