RE: [PHP-WIN] Date question

From: Date: Tue, 24 Jun 2003 17:39:54 +0000
Subject: RE: [PHP-WIN] Date question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-20536@lists.php.net to get a copy of this message
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:phpit@caricese.it] Sent: Tuesday, June 24, 2003 1:37 PM To: Harpreet; php-windows@lists.php.net Subject: RE: [PHP-WIN] Date question > From: Harpreet [mailto:harpreet@crispincorp.com] > > 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

« previous php.windows (#20536) next »