Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add Days to a TimeStamp

Hi,

Do you know how can I add a day to one timestamp? (Ex. EntryDay + 2)

So if a process entry day is during the weekend, the SLAs start to count since monday.

Ex: Entry date:  24/03/2012 11:52:02 (Saturday)

if( weekday(EntryDate = 'Sat'), EntryDay + 2, EntryDate) as WorkingEntryDay.

Regards,

Gonçalo

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Try:

if( weekday(EntryDate = 'Sat'), timestamp(EntryDay + 2), EntryDate) as WorkingEntryDay

Regards,

Yigal.

View solution in original post

4 Replies
Not applicable
Author

Hi,

Try:

if( weekday(EntryDate = 'Sat'), timestamp(EntryDay + 2), EntryDate) as WorkingEntryDay

Regards,

Yigal.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

    

if( weekday(EntryDate) = 'Sat', TimeStamp(Num(EntryDay) + 2), EntryDate) as WorkingEntryDay

Celambarasan

Not applicable
Author

Perfect! Tks

qlikconsultant
Creator III
Creator III

Hi,

i have a simlar problem. I try to add a day if the time is between 00:00:00 and 05:00:00

EntryDay='01.06.2012 01:24:41'

I tried :

if(time(EntryDay <'05:00:00'), timestamp(EntryDay+ 1), EntryDay) as Correct_Date

but it is not working.

Regards

Markus