Thursday, March 8, 2012

Date Format?

Hi all,
Can i insert a date into SQLServer using this format 10072005? (mm/dd/yyyy)
Can i reference data in a search (WHERE) using this format?
IE: WHERE startdt >=01011753 AND enddt <= 10072005
In otherwords a date that doesn't include any separators?
Is this a bad idea?
Cheers,
AdamAdam,
Prefer to use this format:
'20051006' --October 6, 2005
HTH
Jerry
PS - Thanks again Hugo ;-)
"Adam Knight" <adam@.pertrain.com.au> wrote in message
news:OKK18ssyFHA.1264@.tk2msftngp13.phx.gbl...
> Hi all,
> Can i insert a date into SQLServer using this format 10072005?
> (mm/dd/yyyy)
> Can i reference data in a search (WHERE) using this format?
> IE: WHERE startdt >=01011753 AND enddt <= 10072005
> In otherwords a date that doesn't include any separators?
> Is this a bad idea?
> Cheers,
> Adam
>|||Yes, it is a bad idea. Please check http://www.karaszi.com/SQLServer/in...ime
.asp first and
post back if further questions.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Adam Knight" <adam@.pertrain.com.au> wrote in message news:OKK18ssyFHA.1264@.tk2msftngp13.ph
x.gbl...
> Hi all,
> Can i insert a date into SQLServer using this format 10072005? (mm/dd/yyyy
)
> Can i reference data in a search (WHERE) using this format?
> IE: WHERE startdt >=01011753 AND enddt <= 10072005
> In otherwords a date that doesn't include any separators?
> Is this a bad idea?
> Cheers,
> Adam
>

No comments:

Post a Comment