RE: [PHP-WIN] Date question

From: Date: Tue, 24 Jun 2003 17:37:06 +0000
Subject: RE: [PHP-WIN] Date question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-20535@lists.php.net to get a copy of this message
> 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

« previous php.windows (#20535) next »