Skip to Content.
Sympa Menu

freetds - Re: changing the date format string

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: changing the date format string
  • Date: Thu, 7 Jun 2001 15:35:55 -0700


Eric Deutsch writes:
>
> I wanted to change the format of the date string that is printed upon
> return
> of a query (using Perl, DBD::Sysbase, and FreeTDS 0.51 TDS 7.0) into my
> favorite format. The only way I could figure out was to wade into the code
> and make a change like this in convert.c:
> 511c511,512
> < strftime(dest, destlen-1, "%b %d %Y %I:%M%p",
> ---
> > /* strftime(dest, destlen-1, "%b %d %Y %I:%M%p", */
> > strftime(dest, destlen-1, "%Y-%m-%d %H:%M:%S",
>
>
> Is there another/better way to do this? (without using T-SQL CONVERT()
> every
> time)
>
> If not, may I suggest that the strftime format string be added as an option
> to the new conf file?

OpenClient handles that with locales handling (see also the _date_fmt
func() call in the DBD::Sybase manual page), but this may not be
supported by FreeTDS (yet).

Michael
--
Michael Peppler - Data Migrations Inc. - mpeppler AT peppler.org
http://www.mbay.net/~mpeppler - mpeppler AT mbay.net
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page