View Full Version : Convert date (DD/MM/YYYY) into timestamp
09-12-2011, 11:10 PM
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-12-2011, 11:16 PM
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-12-2011, 11:39 PM
Ahh, that worked, thank you :)
09-13-2011, 12: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.