Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi from the Startdate to Enddate i need calculate the no of days and hours,
so i have enter the expression as ,
Interval(Startdate-Enddate,'d hh:mm')
but it is not returning the value kindly clarify me.,
Hi Lakshminarayanan,
Please try below one:
Load
..
num(Startdate)-Num(EndDate) as NOofDays,
..
From
<path...>
Thanks,
Arvind Patil
hi need to calculate the hours also ,kindly help me out
Hi Lakshminarayanan
I hope this works.
Please check below code:
set a=26/04/2017;
set b=27/05/2017 10:05:00;
let c=Interval(Date(b,'DD/MM/YYYY hh:mm:ss')-Date(a,'DD/MM/YYYY hh:mm:ss'),'DD hh:mm:ss')
Thanks
Sristi
Are both Startdate and Enddate in numerical date format, or as strings? For a quick check, create a list box for each field and check the alignment - if left aligned they are string values and you need to convert them to dates (preferably when you load them).
Something like
LOAD ....
Date(Date#(Startdate, 'yyyy/MM/dd hh:mm')) as Startdate,
Date(Date#(Enddate, 'yyyy/MM/dd hh:mm')) as Enddate,
...
(change the fomat string to match the format of the string values)
Then the syntax you used should work.