I am reading a CSV file with dates in non-US format:
$date = 25/10/2010 19:34
which should to write to MySQL as 2010-10-25. The time element is not important.
I have only just noticed (after a couple of months) that $tmstmp = strtotime($date )
is returning false because strtotime expects a US style date.
Is there anybody that knows a way around this? I am suprised I have never encountered this problem so far.
I can only think of string manipulation to re-order the date format.
$date = 25/10/2010 19:34
which should to write to MySQL as 2010-10-25. The time element is not important.
I have only just noticed (after a couple of months) that $tmstmp = strtotime($date )
is returning false because strtotime expects a US style date.
Is there anybody that knows a way around this? I am suprised I have never encountered this problem so far.
I can only think of string manipulation to re-order the date format.
Comment