Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Start Date End Date Desired Column Values(how to accomplish this difference on no of months between 2 Dates)
3/01/2014 6/01/2014 3
3/01/2014 7/01/2014 4
3/01/2014 8/01/2014 5
3/01/2014 9/01/2014 6
3/01/2014 10/01/2014 7
Hi
Try like this
LOAD Startdate,
Enddate,
Round(num(Interval(Enddate-Startdate))/30) as check
FROM
(ooxml, embedded labels, table is Sheet1);
Please try this
Test:
LOAD * Inline
[
StartDate, EndDate
'3/01/2014' ,'6/01/2014'
'3/01/2014' ,'7/01/2014'
'3/01/2014' ,'8/01/2014'
'3/01/2014' ,'9/01/2014'
'3/01/2014' ,'10/01/2014'
];
NewTest:
LOAD * , (date(date#(EndDate,'DD/MM/YYYY'),'DD/MM/YYYY')) - (date(date#(StartDate,'DD/MM/YYYY'),'DD/MM/YYYY')) as Diff
Resident Test;
DROP Table Test;
PFA another Solution
Hi,
You can find the solution in this doc
Calculating Months difference between two dates
write this expression:
=Day(Interval(Date#(EndDate,'DD/MM/YYYY')-Date#(StartDate,'DD/MM/YYYY')))+1