You are here: A quick one - COnvert Date « PHP Programming Language « IT news, forums, messages
A quick one - COnvert Date

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация