|
Posted by Gert-Jan Strik on 02/11/06 20:36
Erland Sommarskog wrote:
>
> Gert-Jan Strik (sorry@toomuchspamalready.nl) writes:
> > But I would probably also specify the datetime as '2006-02-07 02:07:00'.
> > I still use SQL 7.0, and this format is upwards compatible. The format
> > '2006-02-07T02:07:00' is harder to read, and needs at least SQL Server
> > 2000.
>
> But '2006-02-07 02:07:00' is subject to different interpretations depending
> on dateformat settings. For instance try:
>
> SET LANGUAGE Dutch
> go
> SELECT convert(datetime , '2006-02-07 02:07:00')
> go
> SET LANGUAGE Swedish
> go
> SELECT convert(datetime , '2006-02-07 02:07:00')
> go
You are right, I made a mistake. I would have written '20060207
02:07:00', which has no such side effects. So Tony was right: under
normal circumstances, no one would use "convert(datetime, '2006-02-07
02:03:00', 120)" on SQL Server.
Gert-Jan
Navigation:
[Reply to this message]
|