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 Tony Rogerson on 08/24/07 14:39

> Picky, picky, but the proper term is "ISO-8601 Standard" and the
> Standard SQL format is "yyyy-mm-dd" from that Standard :)
>

I doubt I'll get an answer, but yyyy-??-?? don't work in SQL Server so why
do you keep telling people to use it?

select cast( '2007-04-01' as datetime )
select cast( '2007-04-01T00:00:00' as datetime )

Here in the UK in cloudy Harpenden with the default connection settings
gives these results....

-----------------------
2007-01-04 00:00:00.000

(1 row(s) affected)


-----------------------
2007-04-01 00:00:00.000

(1 row(s) affected)

Why do you keep telling people to use yyyy-mm-dd when you have been told
several times of this behaviour?

--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]


"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1187913393.825664.145820@e9g2000prf.googlegroups.com...
>>>'YYYYMMDD' is one of the standard, non-regional formats supported by SQL
>>>Server. No special conversion is necessary: <<
>
> Picky, picky, but the proper term is "ISO-8601 Standard" and the
> Standard SQL format is "yyyy-mm-dd" from that Standard :)
>

 

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

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