Posted by Angelos on 05/20/05 19:03
Ok I have the folowing :
$theValue which is equal to $_POST['start_date']
the date is in the Format of : dd-mm-yyyy
and i want to put it in the database into the form of yyyymmdd
I do that :
$theValue = date('Ymd',strtotime($theValue));
but it is WRONG it returns -1 or 19700101
what should I do ?
to convert dd-mm-yyyy into yyyymmdd in order to store it in a database as
integer and use it later to make calculations between two dates ?
Thanks
[Back to original message]
|