I need a way to get this script to work where the user can pick a time (using this) and a date (using this) and then have PHP process that for a unixtimestamp.
javascript time picker into unixtimestamp
Collapse
X
-
i think you best use strftime() and strtotime()I need a way to get this script to work where the user can pick a time (using this) and a date (using this) and then have PHP process that for a unixtimestamp.
then you form the format you need in strftime. remember PHP is only executed on page load so you'll have to reload the page (or use ajax) to format dates -
Ok! thanks! I was going to lookinto strpos() and substr() and then put that in mktime() but this looks faster!i think you best use strftime() and strtotime()
then you form the format you need in strftime. remember PHP is only executed on page load so you'll have to reload the page (or use ajax) to format datesComment
-
it is :) strtotime is even capable of turning "twentyfift h of december 2009" into a timestamp. maybe even "christmas 2009" but i'm not sure there. it's a very powerful command. but be careful with "02-04-09", it might reply the wrong timestamp.Comment
Comment