egoselfaxis
asked on
PHP dates question - need to parse and stitch together form values to create date/time object
I'm developing a PHP-based app that uses date and time pickers.
The calendar picker that I'm using stores both the start & end dates in a single form field named "auction_dates", and stores them in the following fomat (ie: including the arrow separator):
2009-05-20 -> 2009-05-28
The time pickers that I'm using store the time values in 2 separate form fields named "time1" and "time2", and stores the times in the following 24-hour format:
14:15
Using PHP, --- I need to somehow parse the "auction_dates" field value (into 2 different dates -- startdate & endate), and then stitch things together in such a way that I end up with 2 different date/time objects (starttime & endtime) that are in the following format:
2009-05-27 10:07:00
How should I go about this?
Thanks,
- Yvan
The calendar picker that I'm using stores both the start & end dates in a single form field named "auction_dates", and stores them in the following fomat (ie: including the arrow separator):
2009-05-20 -> 2009-05-28
The time pickers that I'm using store the time values in 2 separate form fields named "time1" and "time2", and stores the times in the following 24-hour format:
14:15
Using PHP, --- I need to somehow parse the "auction_dates" field value (into 2 different dates -- startdate & endate), and then stitch things together in such a way that I end up with 2 different date/time objects (starttime & endtime) that are in the following format:
2009-05-27 10:07:00
How should I go about this?
Thanks,
- Yvan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works great - thanks!
- Yvan
- Yvan
Open in new window