Discussion Board for collaboration related to QlikView App Development.
Hi All,
I have a field called StartTime, which is MM/DD/YYYY hh:mm:ss format.
I want to write a logic like below:
if my StartTime is falling under Satday or Sunday, then it will show Next Monday 08:00:00, else StartTime.
Could anyone please help me how to put this in Qlikview Script.
Thanks,
Sarif
May be this?
If( Match(WeekDay(StartTime), 'Sat', 'Sun'), TimeStamp(WeekStart(StartTime,1,0)+8/24), TimeStart)
Note: Assuming your field is a real timestamp field and not a string field. Otherwise, you have to convert the string using parsing function like date#()/timestamp#().
May be this?
If( Match(WeekDay(StartTime), 'Sat', 'Sun'), TimeStamp(WeekStart(StartTime,1,0)+8/24), TimeStart)
Note: Assuming your field is a real timestamp field and not a string field. Otherwise, you have to convert the string using parsing function like date#()/timestamp#().