You can also place this into your script: ini_set('mssql.datetimeconvert' , 0);
although the format is still changed: In the DB: 3/24/2003 7:05:17 PM Output onto php page: 2003-03-24 19:05:17 Thanks, John Ellingsworth -----Original Message----- From: Darvin Andrioli [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 1:37 PM To: Harpreet; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Date question > From: Harpreet [mailto:[EMAIL PROTECTED] > > I am using php with sql server. I have a field expiration which is of type > datetime. > > I add a date for the expiration as '06/24/03 09:09:09' using a web form. > When i try to display the same expiration in an edit form using > $row["expiration"] it displays it as 'Jun 24 2003 09:09 AM'. > How can I display the date as the above without the conversion. Do you mean MS SQL Server? If so, you must use the 'convert' function inside your SQL query (i.e. select top 10 convert(char(10),DateTime_field,120) from MyTable ) ). Darvin -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php