回答編集履歴

1

修正

2016/10/03 03:31

投稿

yambejp
yambejp

スコア114843

test CHANGED
@@ -2,8 +2,28 @@
2
2
 
3
3
 
4
4
 
5
- $str="Y-m-d h:i:s";
5
+ $str="Y-m-d h:i:s";//正しくはH:i:s
6
6
 
7
7
 
8
8
 
9
9
  ではないでしょうか?
10
+
11
+
12
+
13
+ #追記
14
+
15
+ ```PHP
16
+
17
+ $str="Y-m-d H:i:s";
18
+
19
+ $datetime_at="2016-10-03 03:00:00";
20
+
21
+ $day=date_create_from_format($str,$datetime_at);
22
+
23
+ date_time_set($day,0,0,0);
24
+
25
+ print date_format($day,'Y-m-d H:i:s');
26
+
27
+
28
+
29
+ ```