#12655 [Com]: date-format problem

From: Date: Sun, 08 Dec 2002 22:52:50 +0000
Subject: #12655 [Com]: date-format problem
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27082@lists.php.net to get a copy of this message
ID: 12655 Comment by: xoror@infuse.org Reported By: thomas.winkler@jawa.at Status: Closed Bug Type: MSSQL related Operating System: Win2k PHP Version: 4.0.6 New Comment: i'm using php 4.2.3 and i'm still having this problem ;( where can i get php 4.2.0 so i can test if that version works ? Previous Comments: ------------------------------------------------------------------------ [2002-04-23 14:12:43] mbretter@inode.at I wrote a patch wich has been commitef by fmk, it is php4.2 one of the latest version of php_mssql.c php_mssql.h have a patch for this problem, because the function dbconvert() of the MSSQL-Client-Api wich is used for converting the datetime-values does wired things. There is a new option in the php.ini called mssql.datetimeconvert if set to Off then the datetime values are returned in the format YYYY-MM-DD HH:MM:SS. This patch is also in php4.2 ------------------------------------------------------------------------ [2002-04-22 17:44:18] sniper@php.net Reopen if you have the same problem with 4.2.0 (released today) ------------------------------------------------------------------------ [2002-04-22 15:02:18] steved@mad.scientist.com I created a patch and submitted to php-dev group. Didn't get much reponse so I started looking at CVS and found that a change was checked in 6 months ago for this problem, but wasn't put in to the 4.1.0 to 4.1.2 code bases. The fix should be in 4.2. Steve Dillon ------------------------------------------------------------------------ [2002-04-16 14:06:03] steved@mad.scientist.com Same problem. I need access to at least the Seconds fields as we are processing telephone billing records. Hard to bill to the seconds when you can only query minutes. Will probably have to go back to ODBC db driver, or look at making a custom patch in my PHP_MSSQL.dll. Steve Dillon ------------------------------------------------------------------------ [2001-08-08 12:02:35] thomas.winkler@jawa.at webserver: IIS5 (Win2k) php-version: php4.0.6 (CGI) db-server: MS SQL Server 2000 I've run into problems when fetching fields of type datetime from the database. When using the MS SQL Query Analyzer I get the dates formated like this out of the database: 2001-06-08 08:14:40.000 When using php to send my queries (mssql_query) to the database I get the dates formated like this: 08 06 2001 8:14 In my application I'd need the same format as i get it in the Query-Analyzer. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=12655&edit=1

« previous php.bugs (#27082) next »