Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
Could someone tell me how QV gets the number value used for the time?
It must be something like the time in seconds since 1970 or something??
E.g the value 40294.72818287
What i would like todo is count how many rows of data fall into specific time periods, e.g within the last 3 hours, last 6 hours etc etc.
That bit i'm ok with, but i want to be able to select values that are DateTime>= num(now())- 'the number value that is 3 hours e.g 0.006xxxx'
Thanks,
Peter.
Peter,
The integer part is days, the fraction is time as part of the day. So, three hours back is now()-3/24, 6 hours back is now()-6/24
Peter,
The integer part is days, the fraction is time as part of the day. So, three hours back is now()-3/24, 6 hours back is now()-6/24
Hello Michael,
Thanks for the info, that makes much more sense now!
However i now need alittle help with this expression:
Count ({<MY_DateTimeStamp ={'>=$(now(2)-7)'}>}MY_ID)
This is from a table with the first expression of count(MY_ID) which works fine, but the above SA expression returns the same value as the previous expression.
The now(2) returns the program start timestamp, -7 is 7 days ago, which works fine in a simple text box. Using the $() to return the calculated number for the timestamp.
The field MY_DateTimeStamp has the number value of the datetime.
I think the problem is in the SA expression as it works when i manually enter a date in num format. i.e {>=40111.12345}
Any ideas?
Thanks,
Peter.
It could be SA or data format of the MY_DateTimeStamp field or both. I'm not "fluent" in SA syntax, sorry. Just try playing with it and figure out.
(Maybe it makes sense for you to submit a separate question here. Usualy I don't read posts with many replies - probably most people do the same.)
Hello,
Just to finish my own question, i fixed the syntax, it was a missing =
Correct formular is
Count ({<MY_DateTimeStamp ={'>=$(=now(2)-7)'}>}MY_ID)
Peter.
Sure, makes perfect sense