Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Date Time
Need another pair of eyes please.
As part of a web service I've been recording the last date.time each user requested data so I can force a timeout if the user has been idle for x amount of time.
Seems straight forward.
For each request I've been recording in a datetime field.
Firstly I retrieve the decimal value of time via
and then just store it in the field like so
Thought this was working just nicely but what I've since found is that what is actually being saved to the record is
date().time()
The decimal value of time is not being saved but the actual time() function value ie how many seconds after midnight which is not how datetime fields work.
I only write to this field in one place so I'm pretty sure I'm not overwriting it anywhere else so any thoughts on what I'm missing?
As part of a web service I've been recording the last date.time each user requested data so I can force a timeout if the user has been idle for x amount of time.
Seems straight forward.
For each request I've been recording in a datetime field.
Firstly I retrieve the decimal value of time via
TimeDecimal = Mod(Time(), 86400)
and then just store it in the field like so
userrec<last_login$> = Date():".":TimeDecimal
Thought this was working just nicely but what I've since found is that what is actually being saved to the record is
date().time()
The decimal value of time is not being saved but the actual time() function value ie how many seconds after midnight which is not how datetime fields work.
I only write to this field in one place so I'm pretty sure I'm not overwriting it anywhere else so any thoughts on what I'm missing?
Comments
Funny how your pair of eyes saw the same thing my pair of eyes saw yesterday and then overlooked this morning when I went to fix it.
This morning my head went back to "Mod()", oh that means the bit after the decimal point