I am trying to convert the format of this date 25/02/2017 to 2017-02-25.
I am using the PHP date function date('Y-m-d',strtotime('25/02/2017'));
But the output i receive is 1970-01-01. What should be the problem?
Asked
Active
Viewed 37 times
0

Vignesh Chinnaiyan
- 411
- 3
- 16
-
Well what does `strtotime('25/02/2017')` return? – miken32 Mar 03 '17 at 04:57
-
@miken32 it gives 0 – Vignesh Chinnaiyan Mar 03 '17 at 04:57
-
1Possible duplicate of [Strtotime() doesn't work with dd/mm/YYYY format](http://stackoverflow.com/q/2891937/1255289) – miken32 Mar 03 '17 at 04:58
-
1format passed to `date()` is invalid.Please check this:-https://eval.in/746825 – Alive to die - Anant Mar 03 '17 at 04:59