Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i compare dates that are a range? Pls Help :)

Status
Not open for further replies.

angel0910

Programmer
Jun 26, 2002
17
0
0
SG
Hi to all :D

I have a problem..
Let's say i have a date to compare..
Maybe a birthdate...

then i would like to remind the user of this birthdate starting frm 3 days away, then subsequently everyday( 2 days away, 1 day away and the actual day itself)
how do i compare?
thanxs a million :)
 
you could use DATEADD, e.g. to test whether the current date is three days before a BirthDate:

GETDATE() = DATEADD(day, -3, BirthDate)

returns True if they are the same.

cheers

Nathan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top