bulgarian388
11-29-2006, 01:11 AM
Hi All, I am attempting to calculate the difference in minutes between two date.time fields. My Code is like this:
currentDateTime = now()
response.Write(failedLoginDateTime & "<br />")
response.Write(currentDateTime & "<br />")
response.Write(lockOutTime & "<br />")
response.Write(dateDiff("n", formatDateTime(currentDateTime,3), formatDateTime(failedLoginDate,3)) & "<br />")
And this is what comes out when viewed:
11/28/2006 5:18:46 PM
11/28/2006 6:05:37 PM
01:15:00
-1085
Now, I'm not stupid or anything, but doesn't 6:05 - 5:18 = 47 minutes? Then why is my dateDiff function resulting in -1085? Any asistance on how to get a correct value out of this would be greatly appreciated.
P.S. This is for a failed login tracking system.
Thanks in advance
currentDateTime = now()
response.Write(failedLoginDateTime & "<br />")
response.Write(currentDateTime & "<br />")
response.Write(lockOutTime & "<br />")
response.Write(dateDiff("n", formatDateTime(currentDateTime,3), formatDateTime(failedLoginDate,3)) & "<br />")
And this is what comes out when viewed:
11/28/2006 5:18:46 PM
11/28/2006 6:05:37 PM
01:15:00
-1085
Now, I'm not stupid or anything, but doesn't 6:05 - 5:18 = 47 minutes? Then why is my dateDiff function resulting in -1085? Any asistance on how to get a correct value out of this would be greatly appreciated.
P.S. This is for a failed login tracking system.
Thanks in advance