I need to insert date time to an oracle table with php.
my date string is this format:
'2013-10-22 08:02:30', '2013-10-22 13:02:30', '2013-10-22 21:02:30' etc.
When I use this format in php,
$date1=to_date('2013-10-22 08:02:30','YYYY-MM-DD HH24:MI:SS')
I see that the data in the oracle table is in PM format. How is this possible? How can I change the to_date so that anything 12 is am, and any time that is 12 and up is pm?
$date1=to_date('2013-10-22 00:02:30','YYYY-MM-DD HH24:MI:SS')
尝试
$date1 = date("Y-m-d H:i:s", strtotime('2013-10-22 00:02:30'));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.