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.
ある日付'date'(current_timestamp()で作成)を変換しようとして、2013-02-13 17:38:08を表示していますが、秒を表示したくありません。でも使うdate('Y-m-d H:i', $date)と
date('Y-m-d H:i', $date)
1970-01-01 01:33
私は正しいphpメソッドを使用していないと思います、誰かが助けることができますか?
最高、Mehdi
dateパラメータをタイムスタンプとして受け入れるため、strtotime最初に変換するために使用します。
date
strtotime
date('Y-m-d H:i', strtotime($date))
使いやすいかもしれませんsubstrか?
substr