Re: Out-of-the-box "date format" values for "default" and "en_US" locales
Geoff Montee <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAA7biFNjmP8U-XqUOOXdcDTvM-qdTjSUM78cvMXbNHD4rYcpUQ@mail.gmail.com> |
Hi Matthew, On Mon, Apr 13, 2015 at 11:48 PM, <[email protected]> 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 [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds