Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have these 2 dates 04 Jun 2021 is a Friday while 05 Jun 2021 is a Sat
I use Interval(DATE_END - DATE_START,'DD hh:mm:ss' )
I get the time difference 06:16:15
But I need to remove the Weekend time starting from 05 Jun 2021 00:00:00 so the expected result is
the difference between 04 Jun 23:47:35 to 05 Jun 00:00:00
I search the entire community chat and tried the script below as I think is more suitable.
Interval(DATE_END - DATE_START,'DD hh:mm:ss' ) - NetWorkDays(DATE_START,DATE_END )
But it gave me a negative value. I tried many ways to but I am not getting anything close.
is there any solution for is?
Expected result shall be formatted to DD hh:mm:ss
Good morning
I Recomend that you put a condition , if end date is sat then 05/06/2021 00:00:00
If(num(weekday(DateEnd))=5,date(DateEnd,'DD/MM/YYYY 00:00:00'),DateEnd)
But how shall I use it?
Can you share sample of your qvw please
I only have access to data load editor and it look something like this
LOAD
DATE_START,
DATE_END
FROM [lib://WorkingENV/TEST/DATA.qvd]
LOAD
DATE_START,
If(NUM(WEEKDAY(DATEEND))=5,date(DATEND,'DD/MM/YYYY 00:00:00'),DATEND)
FROM [lib://WorkingENV/TEST/DATA.qvd]
I tried, but I have another scenario that I need to remove start date and time on Weekend. so I use another conditon for start weekend?
is there a simpler solution like I convert networkdays to DD HHMMSS?