

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Subtract a day from a set of time
Hello,
I am trying to display total account register from today 8.00 AM to yesterday 8.00 AM and i want to find out people registered from beginning of the day to today 8.00 AM.
Can anyone help me with the code to subtract one day from 8.00 AM today?
Thanks,
Adam
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
The function to get today 8 AM is =TimeStamp(Today() + 0.3333334), where numeric part is actually 8 AM.
Then to get yesterday 8 AM you can use =Timestamp(Today() - 1 + 0.3333334).
HIH
Elena

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
The function to get today 8 AM is =TimeStamp(Today() + 0.3333334), where numeric part is actually 8 AM.
Then to get yesterday 8 AM you can use =Timestamp(Today() - 1 + 0.3333334).
HIH
Elena


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try like this
=Ceil(Interval(Date#('4/16/2013 12:00:00', 'MM/DD/YYYY hh:mm:ss') - Date#('4/11/2013 12:40:32', 'MM/DD/YYYY hh:mm:ss'), 'DD' ))
Hope this helps you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
to subtract one day you can add
-1 to your field (1 in Qlik is one day)
for example
first line is today at 8:00 AM
second is yesterday at 8:00 AM (just added -1)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
Use expression like Timestamp(Today()-1) for previous date.
Thanks,
Ram Krishna


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your quick response. The solution works for me. I got another question, how to count the number of registered user from specific date?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It depends on the model you have.
but in common you can try:
Count({$<TimeOfRegistration={">=$(=Timestamp(Today() - 1 + 0.3333334))<=$(=Timestamp(Today() + 0.3333334))"}>}
RegistrationID)
This means that you check whether the time of registration is in the interval of yesterday 8 am and today 8 am. If the answer is positive - the counter increments, if negative - nothing happens.
Elena


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How can I count:
1. Total account register from before 24/08/2016 until date 24/08/2016 08:00 am?
Can you help me to create function this one. I tried Count({<Date= {"<=$[timestamp(today() + 8/24-1)]"}>} Status), but didn't help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Count({Date={"<=$(=timestamp(today() + 8/24-1))"}>} Status)
probably you have missed the equals sign and changed brackets.
Elena


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Can I ask one more question? I want to set everyday start from 8am not 12am.. For example when i click today, it will show from 8am, not from 12 am. Where can I set the time? anyone can help me to solve this one?
