Time calculation - limit difference to 3 minutes

Mike Smith

Registered User.
Local time
Today, 23:41
Joined
Sep 22, 2000
Messages
20
I have a system that date/time stamps data entry of a record into a table. I want to be able to allow changes if they occur within 3 minutes of original entry-otherwise the record is locked. I can do the lock/unlock. What I haven't figured out is the 3 minute time difference. I'm thinking it's something like:
Between Now() and Now()-03 (Format :mm)

How far off am I? Thanks!
 
Try DateAdd("m",-3,Now()) > [DateRecorded]

HTH,
David R
 
David,
I had to switch "m" to "n" for minutes but otherwise it works great!!! Thank you! Now if you could tell me why my colleague wrote the Date_Entered as DATE ONLY half the time and date AND time the other half.....
Mike
 
If I knew that, I'd be able to retire. Mine does the same thing.
wink.gif
You can format the end result to show a date and time every time, but I believe it will show midnight if they leave off the time (read up on DateSerial())

Sorry about misleading you there, I forgot the m/n thing. Glad you got it working.
 

Users who are viewing this thread

Back
Top Bottom