I've date like this $input = '19/02/2013'
.
How do I insert this date in my table (ISO 8601 format)?
Platform is SQL Server 2005 or SQL Server 2008.
I've date like this $input = '19/02/2013'
.
How do I insert this date in my table (ISO 8601 format)?
Platform is SQL Server 2005 or SQL Server 2008.
Think this should do it.
$dt = new DateTime(strtotime($input));
echo $dt->format(DateTime::ISO8601);
You need to use some php functions to convert to sqlserver date format
$input = 19/02/2013;
$new_date = explode('/',$input);
$date = $new_date[2]-$new_date[1]-$new_date[0];
For ISO format you can use like this
$date->format(DateTime::ISO8601);