Re: [PHP-DB] MS SQL date time strangeness

2004-01-27 Thread Steve
I tried what you had suggested and I still get the same result. Robert Twitty wrote: The date() is for use with the 32-bit C time value returned by functions like time(). Data from fields of type datetime are returned as strings in the form Jan 9 2004 by the mssql extension as the default. To

Re: [PHP-DB] MS SQL date time strangeness

2004-01-27 Thread Robert Twitty
Oops Use Off instead of On, or execute this in your script: ini_set('mssql.datetimeconvert' , 0 ); Note: Do not use the date() function to display the value. Just display it asis. -- bob On Tue, 27 Jan 2004, Steve wrote: I tried what you had suggested and I still get the same result.

[PHP-DB] MS SQL date time strangeness

2004-01-26 Thread Steve
I have Apache 1.3 and PHP 4 running on Windows 98 connecting to a local MS SQL 7.0 server. MS SQL has the date as 2004-01-09 (-MM-DD), when I print the date to a webpage with this PHP code: printf(Date Picked Up: %s\nDate, date(Y/j/n,$row[0]); I get this output: 1969/12/31 What is

Re: [PHP-DB] MS SQL date time strangeness

2004-01-26 Thread Robert Twitty
The date() is for use with the 32-bit C time value returned by functions like time(). Data from fields of type datetime are returned as strings in the form Jan 9 2004 by the mssql extension as the default. To return it using ISO format set mssql.datetimeconvert to On in the php.ini file, or use