can anyone advise how i would convert a date like “Tuesday, 22 June, 2010 00:00” to a unix timestamp using strtotime()? I need to also store the hours and minutes and it’s not clear if is best done using strtotime. Thanks for any help!
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.
Due to the second
,,strtotime()will currently not understand your date/time format (remove it and it will work properly).If you have a static format for the date, using
strptime()orDateTime::createFromFormat()are more reliable, and will allow other non-datetime strings in the date to be present as long as you’ve defined them.