Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm using the below expression in script to get the working days as 8 for weekdays and for weekends as 0.
If(Match(WeekDay(Date(Date#("DATE",'YYYYMMDD'),'M/D/YYYY'),0),'Sat','Sun'), 0,8) as WorkDayFlag,
This is working fine for me in desktop.
But if i run the same using QMC, the task fails and throws the below error.
Can someone help me with the same?
Thanks
Satish
Try
LOAD
If(Match(WeekDay(Date(Date#("DATE",'YYYYMMDD'),'M/D/YYYY')),'Sat','Sun'),0,8) as WorkDayFlag
From Source;
Why you use 0 in statement
If(Match(WeekDay(Date(Date#("DATE",'YYYYMMDD'),'M/D/YYYY'),0),'Sat','Sun'), 0,8) as WorkDayFlag,
Regards
Anand
Try...
If(Match(WeekDay(Date#(DATE,'YYYYMMDD')),'Sat','Sun'),0,8) as WorkDayFlag
Try
LOAD
If(Match(WeekDay(Date(Date#("DATE",'YYYYMMDD'),'M/D/YYYY')),'Sat','Sun'),0,8) as WorkDayFlag
From Source;
Why you use 0 in statement
If(Match(WeekDay(Date(Date#("DATE",'YYYYMMDD'),'M/D/YYYY'),0),'Sat','Sun'), 0,8) as WorkDayFlag,
Regards
Anand
Hi Manish
This is working.
How come it is not throwing any error if i perform the reload in desktop and throwing error if we execute task from QMC?
Also why the expression i mentioned is not working
Thanks
Satish
I'm trying to force the first day as Monday. Hence used 0