hi to all,
Here i using this code to compare current date and expired password date
if (DateTime.Now > userObject.PasswordExpiredDate)
return RedirectToAction("PasswordChange", "Index");
return RedirectToAction("PasswordChange", "Index");
i want to change 30 days once to change the password. now i want to save expired password date in database how to i save it kindly help me
FOR EXAMPLE:
Let consider here i create user 1.6.2014 but i want to save in database 1.7.2014 then only i should compare current date and expired date can you tell how to do?
FOR EXAMPLE:
Let consider here i create user 1.6.2014 but i want to save in database 1.7.2014 then only i should compare current date and expired date can you tell how to do?
Guest UserPosted Aug 10, 2014, 1:38 AM
Have field say password created date , e.g., PwdCreatedDate and second column as validity 30days, now your code should look like this,
If (datetime.now > DateTime.Add(userObject.PwdCreatedDate,30))
return .....
Please accept answer if you find it helpful!