Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I need timestamps filter
for eg: 24hrs timestamp
2015-08-20 12:45:31
2015-08-20 11:45:31
2015-08-20 20:45:31
2015-08-20 00:45:31 - midnight
2015-08-20 18:45:31
for example user need to have another option to see all the values after 6 pm in the evening
I need to filter timestamps if greater than '18 o Clock' . how could I do this using a button>?or is their a better way?
See attached:
Hi,
timestamps are stored internally as a numeric decimal value.
=> You can use the FLOOR() and FRAC() functions to retrieve the date (left of the ,) or time (right of the ,).
=> Then you can use the DATE() or TIME() functions to format them as you like.
Using a button then to filter for all times greater than a certain time should after that be easy.
HTH
Best regards,
DataNibbler
Something like this -
hi digvjay,
I used a slider as well but how do we link..is it through variable or just column
Just column field, I added expression =Time(frac(Timestamp),'hh:mm:ss') in the Field/expression of data section of slider. Selected Multi Value in Mode.
in the script is it possible like if the time is greater than 6pm then a new column ..other than the filter option
It is possible but then you are fixing this column to show entry only greater than 6 pm, you will need script change if you need greater than any other time later.
load Timestamp, if(frac(Timestamp)>18/24,Timestamp) as After6PM;
load * inline [
Timestamp
2015-08-20 01:45:31
2015-08-20 02:45:31
2015-09-20 20:45:31
2015-10-20 18:45:31
2015-11-20 20:45:31
2015-11-20 18:45:31
2015-12-20 20:45:31
2015-12-20 00:45:31
2015-12-20 18:45:31
];
See if below option can suit you, you can create list box with greater than 6 pm entries through expressions -
sample qvw is attached -
Please check if this logic fits to you
LOAD
Time,
Time(Round(Time,1/4)) as Flag; // This flag
LOAD
MakeTime(RecNo()-1,IterNo()-1) as Time // use your data here
AutoGenerate 24
While IterNo() < 60;
Hi raadwiptec,
please take some time to review and close those of your threads that have received correct answers.
(Your threads will be closed by marking an answer as correct.)
thank you
regards
Marco
Hi,
one solution using a button could be some "select in field" action with a search string like:
='=Frac(yourtimestamps)>''18:00:00'''
hope this helps
regards
Marco