Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I am using the below script for creating a variable for Previous day's date.
LET varPreviousDay = '(' & DayName(DayStart(today()-1)) & ')';
Please someone help me with script for creating a variable - Past 24 Hours.
LET v24HoursAgo = now()-1;
May a bit simpler:
LET varPreviousDay = '(' & DayName(today()-1) & ')';
Not as cleans as Gysberts but the same principle
LET v24H = date(now()-1)&' '& time(now())
My opinion too :
LET v24HoursAgo = Date(now()-1, 'MM/DD/YYYY hh:mm:ss');
if you want to see the timestamp...
S.
Thanks for the prompt replies friends.
I have a column of TimeStamps like below.
5/12/2015 1:20:02 PM
5/11/2015 11:30:05 PM
.
.
.
.
etc.,
I am trying to select dates (timestamps) for the tickets created in last 24 hours.
I tried LET varPreviousDay = '(' & DayName(DayStart(today()-1)) & ')'; and the result is it is selecting 5/12/2015 tickets.
But I want to select the last 24 hours. The current time of mine is now 5/13/2015 2:55 PM IST.
I want to select the date / time stamps for last 24 hours like 5/12/2015 2:55 PM IST to 5/13/2015 2:55 PM IST.
Hi,
Setup an expression where you only show the values that are bigger then your set variable time stamp and you should get the correct behavior.
Hampus, Sorry for asking. I am not able to understand. I have tried the last response received LET v24HoursAgo = Date(now()-1, 'MM/DD/YYYY hh:mm:ss'); and it is showing the variable result as time stamp before 24 hours. But when I am using this variable in a button. it is looking for the entry at that particular timestamp.
We need to find a way for a script variable to show the time stamp which will select all the timestamp entries for the last 24 hours.
to be simpler... Select all the tickets created between the timestamp of last 24 hours.
What about create a field concatenated as yyyymmddhhmmss, either for variable and your timestamps and use that?
S.