You are here: Re: Convert CHAR YYYYMMDD to mm/dd/yyyy « MsSQL Server « IT news, forums, messages
Re: Convert CHAR YYYYMMDD to mm/dd/yyyy

Posted by Erland Sommarskog on 08/26/07 18:46

--CELKO-- (jcelko212@earthlink.net) writes:
>>> Here in the UK in cloudy Harpenden with the default connection settings
gives these results... <<
>
> That's funny -- here in sunny Austin I get the right answer with my
> connection settings. Moral to the story "Think globally (i.e. ISO)
> and act locally (i.e fix your dialect and proprietary setting)" to
> paraphrase the Greens.

And think global means "if it works in where I am, it works"? I know
that it's hard to be humble if you are from Texas, but this is getting
out of hand.

Fact is, in SQL 2005 the format YYYY-MM-DD is subject to local settings
and cannot be trusted, ISO or not. Of course, it was a design made in
California, so I can understand that it's hard for you to swallow.

To soothe you, these two formats are safe:

YYYY-MM-DDThh:mm:ss
YYYY-MM-DDZ

And it seems that when you work with the new date and time data types in
SQL 2000, YYYY-MM-DD is always correctly interpreted.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация