Re: ASP > SQL date problem!?
From: CJM (cjmnews04_at_newsgroups.nospam)
Date: 09/02/04
- Next message: joker: "Re: Print template"
- Previous message: CJM: "Re: HTML & Browser Compatibility"
- In reply to: Bob Barrows [MVP]: "Re: ASP > SQL date problem!?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Sep 2004 17:36:58 +0100
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OWpWAWOkEHA.548@TK2MSFTNGP11.phx.gbl...
>
> Wron. SQL Server will also accept the ISO standard date:
>
> YYYYMMDD
>
>
I agree with your advice, Bob, but I'm uneasy about the use of the word
'Standard'.
ISO 8601 states that the standard date format is YYYY-MM-DD, but then goes
on the explain that other delimiters are acceptable as is their omission.
So YYYYMMDD, YYYY-MM-DD and YY-MM-DD are all 'standard' date formats that
meet the ISO 8601 requirements. If you add a time element, as is often
important in DB work then you have further variations still, eg.
YYYY-MM-DDTHH:MM:SS.
Unfortunately, different DB's only accept a subset of the valid formats! So
there's often no way to code some SQL that is truly portable.
Further reading:
RFC3339
ISO8601
etc...
Not quite as straightforward as it should be, perhaps?
Chris
- Next message: joker: "Re: Print template"
- Previous message: CJM: "Re: HTML & Browser Compatibility"
- In reply to: Bob Barrows [MVP]: "Re: ASP > SQL date problem!?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|