Re: MSSQL PHP4pl2 Truncates Dates

From: Date: Mon, 17 Jul 2000 13:26:28 +0000
Subject: Re: MSSQL PHP4pl2 Truncates Dates
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-1119@lists.php.net to get a copy of this message
Flint Doungchak wrote: > > Hello, > > I recent installed PHP4 pl2 on IIS4 on SP6a. I'm connecting to a MSSQL 7.0 SP2 > database and everything seems to be working well (i.e. i can connect and all > that). However, when I select a date column, PHP, or MSSQL, truncates the date. > > For instanace '2000-07-10 00:00:00.000' (as reported by Query Analyzer) in MSSQL > gets passed to PHP as 'Jul 10 2'. Yes, that's a 2 with no zeros after it. > > I've tried converting the date, but that didn't work either (it just spits back > the same thing). I'm new to MSSQL and miss some of the MySQL straightforwardness > but need some of the features of MSSQL. > > Can some here enlighten me as always. > > Thanks in advance. > > -Flint Is there any chance you are using the CONVERT function in the MSSQL query with the string limit set too low (to 8 in this case)? Andrian

« previous php.windows (#1119) next »