View Full Version : Convert date (DD/MM/YYYY) into timestamp
09-13-2011, 12:10 AM
I need to convert a date in the format dd/mm/yyyy (date format got from jQuery datepicker) and i need to convert it to a timestamp.
but that didnt work, how would i do this?
09-13-2011, 12:16 AM
strtotime($_POST['datepicker']) should return a valid timestamp I think. I would check it though.
Easy way to check:
// Both should echo the same thing
echo date("d/m/Y", strtotime($_POST['datepicker']));
09-13-2011, 12:39 AM
Ahh, that worked, thank you :)
09-13-2011, 01:18 AM
No problem :). The manual has a full list of time/date formats strtotime will accept, just as an FYI :)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.