How to Compare Date
| From: | Jack | Date: | Thu, 30 May 2002 12:25:50 +0000 |
| Subject: | How to Compare Date | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19518@lists.php.net to get a copy of this message | ||
Dear all
I had a Input form for user to input the Leave Record,
I want to do some check before the record can insert into database!
Here is the problem i had when checking the Leave From Date and Leave To
Date.
I want to prevent any Leave To Date which is earlier then Leave From Date.
how i can do the comparsion? I had tried to use the following script but it
doesn't work!
<?
$a=$leave_form
$b=$leave_to
if ($a<$b)
{
insert statement
}
?>
It doesn't work since i use the < Operator!
Does anyone know how i can perform this comparsion?
--
Thx a lot!
Jack
nedcor4@nedcor.com.hk