Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このユーザー入力をどのように変換しますか:
2013/01/22 14:33
PHPを使用して通常のSQLタイムスタンプ形式に変換しますか?
2013-01-22 14:33:00
DateTimeを使用createFromFormat
DateTime
createFromFormat
$datetime = DateTime::createFromFormat('m/d/Y g:i a', '01/22/2013 2:33 pm'); echo $datetime->format('Y-m-d H:i:s');