Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikAngel
Partner - Creator
Partner - Creator

Date help

Hi,

My requirement is like below..

if event date = same day of event date  and also next day before 8am then consider as same day of event date.

if entry done on 06th sep and also entry done on 07th sep till 8:00am then consider that date as 06th Sep only.

please help how to do.

16 Replies
florentina_doga
Partner - Creator III
Partner - Creator III

sorry

=date(if(frac(num(time(today())))<0.33333333333576,date(today())-1,date(today())))

QlikAngel
Partner - Creator
Partner - Creator
Author

else part is not working

Chanty4u
MVP
MVP

try below ,

as per florentina dogaru

=date(if(frac(num(time(today())))<0.33333333333576,date(today()-1),date(today())))

florentina_doga
Partner - Creator III
Partner - Creator III

date must be timestamp

maybe this

=date(if(frac(num(time(now())))<0.33333333333576,date(now())-1,date(now())))

Not applicable

Dear Florentina,

We are working on event date, hence now and today wont work on previous data.

If i am selecting 03-09-2016 I should get values from 03-09-2016 after 08 AM and 04-09-2016 before 8 AM.

If Event date is 07th Sep 2016 after 8:00am to 08th Sep 2016 8:00am , then that transaction should show in date as 07th Sep 2016 only.

QlikAngel
Partner - Creator
Partner - Creator
Author

Hi,

Now & today will work for current date..

my requirement is if Date is 04th September'16 then transaction if created after 08:00AM on 04th Sep'16 and on 05th Sep'16 if transaction happens before 08:00AM then it should consider in 04th September..

effinty2112
Master
Master

Hi Mayuri,

                    you only need to subtract 8 hours (= a third of a day) from your timestamp then convert to date

=Date(Num(Timestamp)-1/3)


Regards


Andrew