Reputation: 1864
I need to get the date from a SQL Server datetime
, and then format the date. (i.e. 01-Jan-2000
) I'm using PHP.
currently, SQL is returning 2009-02-13 22:00:00.000
.
Upvotes: 4
Views: 15211
Reputation: 1
Add this to conncetionInfo => 'ReturnDatesAsStrings'=>true
$connectionInfo = array( "Database"=>"AdventureWorks", 'ReturnDatesAsStrings '=> true);
Upvotes: 0
Reputation: 577
You can pool date in any format you want directly from mySQL query,
SELECT DATE_FORMAT(column_name, '%d-%b-%Y') FROM tablename
Upvotes: 1