View Single Post
  #5 (permalink)  
Old September 25th, 2007, 04:36 AM
Dharam Pal Sikhwal Dharam Pal Sikhwal is offline
Authorized User
 
Join Date: Dec 2006
Location: Mumbai, Maharastra, India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Guys,

I am giving a very Simple Method to write your query.

(1) To find the User's List that last login is more then 90 days old and less then 120 days.

Select UserId
From User_Master
Where DateDiff(day,Login_DateTime,GetDate()) between 90 and 120

(2) To find the User's List that last login is more then 120 days old.

Select UserId
From User_Master
Where DateDiff(day,Login_DateTime,GetDate())>=120

Try & Enjoy your Work.



Reply With Quote