Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
when I put the below expression in load script, it gives -1.2952808600665e-005. When I put it in a textbox, it gives 3 which is correct
let t = 4/23/2014 - 4/20/2014
actually the above expression coming from difference of two date fields. can someone please guide me how to fix this
Arif
if you have 2 dates, the difference is (bold)
src:
load
date(today() + rowno()) as d1,
date(today() + 2*rowno()) as d2
autogenerate 100;
fin:
load
d1,
d2,
d2 -d1 as datediff
resident src;
if you have 2 constant dates (I use your format) the difference is
=date#('4/23/2014','MM/DD/YYYY') - date#('4/20/2014', 'MM/DD/YYYY')
Hi,
Try like this
Data:
LOAD
*,
date(Date1) - date(Date2) As Difference
FROM DataSource;
You need to format the date.
Regards,
Jagan.