Re: finding records using a Date expresion

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 08/16/04


Date: Tue, 17 Aug 2004 01:59:33 +0530

you can get today minus 150 days with the help of either of following
expression, 1st will not remove time component whereas 2nd will remove time
component from today's date and will go back 150 days.

getdate() - 150

--OR
(convert(datetime,convert(varchar(8),getdate(),112)) - 150)

-- 
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com