variables

variables

am 10.04.2004 20:16:05 von amy parness

My first if statements are working and adding a 0 before numbers less than
or = to 9 but the second ones (fromdate and todate) are not working. They
are adding the +1 but not the 0 before numbers <=9. Does it have something
to do with it being in () in the main statement?

$x=0

if ($frommonthWidgetValue <= 9)
{
$frommonthWidgetValue = $x.$frommonthWidgetValue;
}
if ($fromdateWidgetValue <= 9)
{
$fromdateWidgetValue = $x.$fromdateWidgetValue;
}


if ($tomonthWidgetValue <= 9)
{
$tomonthWidgetValue = $x.$tomonthWidgetValue;
}
if ($todateWidgetValue <= 9)
{
$todateWidgetValue = $x.$todateWidgetValue;
}


$datestart= $x.$fromyearValue.
"-".$frommonthWidgetValue."-".($fromdateWidgetValue+1);
$dateend= $x.$toyearValue. "-" .$tomonthWidgetValue.
"-".($todateWidgetValue+1);

print $datestart



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org