
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Timestamp manipulation via local variable
Hi,
Can anybody help with a scenario to create local variable that would calculate timestamp similar to "$Now - 24h" ? For instance I have creation time and need to show it in a report exactly 24 hours earlier.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I had the same issue with one of my use cases. My quick solution looks loke this:
Local Variables:
YourDay = GetDayOfMonth(EndTime)
DayBefore = add(YourDay,-1)
YourMonth = GetMonthOfYear(EndTime)
YourYear = …
...
after that you convert all variables to strings and concatenate them. Now you have a string that contains your timestamp (-24h). You can even convert from string to date (if you need a variable of type date).
There's one drawback: If your timestamp is Dec 01 you get Dec 00 (not Nov 30). You might solve this issue by using additional local variables with condition-function (I was to lazy to do this…).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
thanks for you reply. I need to take a timestamp from the, say Manager Receipt Time field, extract 1 day and put new timestamp (as date type) to the Active List or assign it to deviceCustomDate field.