Answers for "Number of weeks between two date fields"

0

Number of weeks between two date fields

SET fWeekDiff = '(((Year($2)*52)+Week($2)))-(((Year($1)*52)+Week($1)))';

Data:
Load
    StartDate,
    EndDate,
    $(fWeekDiff(StartDate,EndDate)) as NoOfWeeks
;
Load 
    Date#(StartDate,'M/D/YYYY')     as StartDate,
    Date#(EndDate,'M/D/YYYY')         as EndDate
Inline [
StartDate, EndDate
1/3/2017, 2/14/2017
2/14/2017, 6/1/2017
6/1/2017, 8/14/2017
];
Posted by: Guest on May-25-2021

Code answers related to "Number of weeks between two date fields"

Browse Popular Code Answers by Language