Skip to Content.
Sympa Menu

freetds - Re: Datetime format return

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Datetime format return
  • Date: Sun, 28 Jul 2002 03:56:10 -0400 (EDT)


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,
>
>




  • Datetime format return, Casey Allen Shobe, 07/27/2002
    • <Possible follow-up(s)>
    • Re: Datetime format return, Brian Bruns, 07/28/2002

Archive powered by MHonArc 2.6.24.

Top of Page