<somthing to ponder />
What datatype is 2002-08-01, and how is it different to a string?

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Scott" <[EMAIL PROTECTED]>
Subject: Re: SQL Query Question


: If there's one thing I've learnt on this list it's to deal with
: dates as 2002-08-01 and not treat them as strings...
:
:
: ----- Original Message -----
: From: "Nathan Steiner" <[EMAIL PROTECTED]>
: To: "ActiveServerPages" <[EMAIL PROTECTED]>
: Sent: Thursday, August 01, 2002 5:49 AM
: Subject: RE: SQL Query Question
:
:
: : <giddy mode="on">
: : I Love Tore's <pet peeve/>'s. They have helped me a lot over the last
year
: : and a half.
: : </giddy>
: :
: : -ns
: :
: : -----Original Message-----
: : From: Bostrup, Tore [mailto:[EMAIL PROTECTED]]
: : Sent: Wednesday, July 31, 2002 2:37 PM
: : To: ActiveServerPages
: : Subject: RE: SQL Query Question
: :
: :
: : <pet peeve>
: : I assume the column signupdate is a Date/Time column and the database is
SQL
: : Server:
: :
: : Never compare a date with a string!
: :
: : Try
: : Select *
: : from customer
: : where signupdate >= CONVERT(DateTime, '2002-07-30 00:00:00', 120)
: : and signupdate <= CONVERT(DateTime, '2002-07-30 23:59:59', 120)
: :
: : </pet peeve>



---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to