hi,
I want to use a date that is selected in a drop down by the user from
a previous page in a sql query.
The date is $thedate and in the format eg 12/04/2004 when i post the
value.
but because the format is in a string i cannot compare it to a value in my
table in the database because the value in the databse is in the format 2004-04-12.
I have tried to use this ....
But i just get the unix epoch value. I guess this is because the arguement
for getdate() is not a not a timestamp but a string.
Can anyone help me figure what i can do to solve this problem.
Thanks
I want to use a date that is selected in a drop down by the user from
a previous page in a sql query.
The date is $thedate and in the format eg 12/04/2004 when i post the
value.
PHP Code:
$thedate = $_POST[sel_date];
table in the database because the value in the databse is in the format 2004-04-12.
I have tried to use this ....
PHP Code:
$datearray = getdate($thedate);
foreach ($datearray as $key => $val)
{
print "$key= $val<br>";
}
for getdate() is not a not a timestamp but a string.
Can anyone help me figure what i can do to solve this problem.
Thanks
Comment