Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

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