[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    [freetds] Re: Datetime format return
From:       Brian Bruns <camber () ais ! org>
Date:       2002-07-28 7:56:10
[Download RAW message or body]

That convert statement is useless.  Style parameters are only applied 
during conversion to string so

select convert(char(20), date, 5) from table

would work fine.  There is some locale handling that went in post-0.53 
that deals with this, so if you are running 0.60pre1 or there abouts you 
can modify the format in the locale.conf file.

Brian

On Sat, 27 Jul 2002, Casey Allen Shobe wrote:

> Hi!
> 
> I'm using FreeTDS 0.53 to access Microsoft SQL Server 2000 via PHP.
> 
> I have several queries that get data from a datetime field.  The format is as 
> follows:
> 
> Jul 27 2002 05:16PM
> 
> The problem is that I need it in 24 hour format, in fact something ISO 
> standard would be highly preferable (I.E. the format I get when using Query 
> Tool / ODBC on Windows).
> 
> Now if I change my statement from:
> 
> select date from table
> 
> to:
> 
> select convert(datetime, date, 5) from table
> 
> ...Nothing changes in the datetime format, so I'm guessing FreeTDS is 
> overriding this somewhere.  Where/how can I fix this?
> 
> Thanks,
> 
> 


---
You are currently subscribed to freetds as: [freetds@progressive-comp.com]
To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic