I have a form which posts date information month, day, yeah, hour, minute, am/pm. How do i encode/decode this to and from unixtime using php?
I have a form which posts date information month, day, yeah, hour, minute, am/pm.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
mktime() – Get Unix timestamp for a date
To handle AM/PM just add 12 to hours if PM.
Alternatively you could use strtotime():
strtotime() – Parse about any English textual datetime description into a Unix timestamp