Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Calculating how many days have passed

Author  Topic 

asdoye111
Starting Member

16 Posts

Posted - 2010-04-01 : 15:36:08
How would i calculate how many days have passed since a person has last created a password, so say, after 90 days they have to change their password.

Column Names:
usrPassword [varchar(20)] = the user's password
usrPwdDate [datetime] = the date that the password was entered
usrPwdExpired [bit] = if this is True, then 90 has passed

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-01 : 15:51:02
usrPwdDate< DATEADD(dd,DATEDIFF(dd,0,getdate())-90,0)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -