Skip to Content.
Sympa Menu

freetds - Re: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Jeffrey Shaw <shawjef3 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Out-of-the-box "date format" values for "default" and "en_US" locales
  • Date: Wed, 15 Apr 2015 22:24:00 -0400

The use case I have, which is using TDS_FDW to select from SQL Server to
PostgreSQL, forces me to change the colon to a dot, so I support that
change.

Jeff

On Wed, Apr 15, 2015 at 6:41 PM, Geoff Montee <geoff.montee AT gmail.com>
wrote:

> Hi Matthew,
>
> On Mon, Apr 13, 2015 at 11:48 PM, <matthew.green AT datamartcomputing.com>
> wrote:
> > The vendor (Sybase) default seems to be with a colon (
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1520/html/iqrefbb/Convert.htm
> ).
> >
> > select convert(char(40),getdate(),109);
> >
> > ----------------------------------------
> > Apr 14 2015 8:42:03:660AM
> >
> > Shouldn't we stick to that?
> >
>
> In the page that you linked, I see that the format style you mention
> is #9 or #109, but I don't see anything to indicate that it is the
> "default." The default style for the convert function in Sybase ASE
> 16.0 appears to use style "100", which omits the milliseconds
> entirely.
>
>
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050437990.html
>
> The documentation also says that there should be a dot, not a colon,
> between the seconds and microseconds by default for the "bigdatetime"
> type:
>
>
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050393286.html
>
>
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050394051.html
>
> Confusingly, it seems to use a colon by default for the "time" type:
>
>
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc36271.1600/doc/html/san1393050395880.html
>
> On another note, FreeTDS's documentation page for locales.conf says this:
>
> http://www.freetds.org/userguide/locales.htm
>
> "locales.conf will probably be dropped from FreeTDS one day. Its only
> real purpose now is to control the format of date strings. The Right
> Way™ to deduce the appropriate default date format is from the
> application's locale settings, while allowing an override in
> freetds.conf. That's the direction we're headed."
>
> Has any thought been given to how date formatting should be handled
> after locales.conf goes away?
>
> Thanks,
>
> Geoff
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page