[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql
Subject: Re: mysql friendly dates
From: william drescher <william () TechServSys ! com>
Date: 2012-04-17 13:50:50
Message-ID: jmjsfs$9e6$1 () dough ! gmane ! org
[Download RAW message or body]
On 4/16/2012 3:04 PM, Haluk Karamete wrote:
> What's the right built in php date function formatting would be to take a
> simple date, that's in a format like 05/16/1960 and turn it into a mysql
> datetime datatype friendly format?
> I don't mind H M S to be as 00:00:00/
>
wrote my own:
function US2ISODateTime($date) {
$dateTime = strtotime($date);
return date('Y-m-d H:i:00', $dateTime);
} //convert from US format to ISO format
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic