Skip to Content.
Sympa Menu

freetds - changing the date format string

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: changing the date format string
  • Date: Thu, 7 Jun 2001 15:28:18 -0700



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?

thanks,
Eric





Archive powered by MHonArc 2.6.24.

Top of Page