Re: [PHP-DEV] sybase-ct and datetime results
On Wed, Apr 25, 2001 at 10:59:15PM +0200, Björn Dolkemeier wrote: (I posted this also to php.db, but the more I think php.dev would be a better place) Hello, If I do a sybase_query(select getdate(),$Conn) this will return the current date in the format Nov 3 1998 8:06PM (so I don't have seconds). I think this leads to the usage of CS_SHORT_DATE in ext/sybase_ct/php_sybase_ct.c (Line 275). Does somebody know, if there is a solution for getting another datetime-format beyond doing something like sybase_query(select convert(varchar,getdate(),108). The only way for the moment is using convert(). Sybase is not playing very nice with datetimes. I noticed this behaviour before in other programs and came to see that it is the server which doesn't return right. Wouldn't it be better to return the datetime-results of queries as a timestamp? Or have a php.ini-setting / global parameter how to return datetime-results? so this is not an option :( -- Jo Giraerts Development Services Engineer VA Linux Professional Services Europe Interleuvenlaan 15A, 3001 LEUVEN, BELGIUM icq:81939849, email:[EMAIL PROTECTED], ph0ne:+32(0)475/437719 I've got these opium queens that move around my space, I said it's waste not, want not, I think I'll take another, I'm holding all this pain that I'm trying to smother. branvan3000 - Afrodisiac -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] sybase-ct and datetime results
(I posted this also to php.db, but the more I think php.dev would be a better place) Hello, If I do a sybase_query(select getdate(),$Conn) this will return the current date in the format Nov 3 1998 8:06PM (so I don't have seconds). I think this leads to the usage of CS_SHORT_DATE in ext/sybase_ct/php_sybase_ct.c (Line 275). Does somebody know, if there is a solution for getting another datetime-format beyond doing something like sybase_query(select convert(varchar,getdate(),108). Wouldn't it be better to return the datetime-results of queries as a timestamp? Or have a php.ini-setting / global parameter how to return datetime-results? Thanks for anwers, Bjoern -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] sybase-ct and datetime results
On Wed, 25 Apr 2001 22:59:15 +0200, Bj,rn Dolkemeier wrote: (I posted this also to php.db, but the more I think php.dev would be a better place) Hello, If I do a sybase_query(select getdate(),$Conn) this will return the current date in the format Nov 3 1998 8:06PM (so I don't have seconds). I think this leads to the usage of CS_SHORT_DATE in ext/sybase_ct/php_sybase_ct.c (Line 275). Does somebody know, if there is a solution for getting another datetime-format beyond doing something like sybase_query(select convert(varchar,getdate(),108). Wouldn't it be better to return the datetime-results of queries as a timestamp? Or have a php.ini-setting / global parameter how to return datetime-results? Thanks for anwers, Bjoern WHen you send the select getdate () PHP doesn't parse that, it just sends it on to Sybase exactly as is. If you issue that query in ISQL, you should get the same result. PHP can't start parsing SQL requests. There are some ways in Sybase to change some of the defaults for date/times. Check the Sybase manuals, they may help. The only other thing that could even possibly be done (and I'm not advocating it) is the creation of a new function that would return the Sybase timestamp with greater precision. Don't get me wrong, I think Sybase should have better time formatting also. For example to format 12/31/2001 23:59:59 it takes two datetimes formatted string catted together, that's pretty sad. But still that is a Sybase issue. Not much PHP can do. Brian -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]