cturner Posted January 28, 2007 Share Posted January 28, 2007 I am wanting to know how do I convert a date that is in four combo boxes to a timestamp? Thanks in advance.Combo boxes look something like this:[u]selectDay[/u]SundayMondayTuesday[u]selectDate[/u]282930[u]selectMonth[/u]JanuaryFebruaryMarch[u]selectYear[/u]200620072008 Quote Link to comment https://forums.phpfreaks.com/topic/36034-converting-a-date-to-a-timestamp/ Share on other sites More sharing options...
artacus Posted January 28, 2007 Share Posted January 28, 2007 First you probably shouldn't have the day of week there. What if They pick "Tuesday", "27", "January", "2007"? Do you pick the Saturday the 27th or Tuesday the 23rd? Anyhow, to answer your question, which probably is a PHP question, use strtotime(). Quote Link to comment https://forums.phpfreaks.com/topic/36034-converting-a-date-to-a-timestamp/#findComment-171027 Share on other sites More sharing options...
bibby Posted January 28, 2007 Share Posted January 28, 2007 Wouldn't you rather interpolate the weekday based on the other 3 params?What is I selectMonday Januray 1 2007 andTuesday Januray 1 2007 ?? Quote Link to comment https://forums.phpfreaks.com/topic/36034-converting-a-date-to-a-timestamp/#findComment-171195 Share on other sites More sharing options...
fenway Posted January 30, 2007 Share Posted January 30, 2007 Or use a proper date picker that produces a MySQL date and forget all of this silliness? Quote Link to comment https://forums.phpfreaks.com/topic/36034-converting-a-date-to-a-timestamp/#findComment-172925 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.