yogesh kapil
19th June 2012, 13:13
hi,

can you please help how can i subtract one date from another.

Thanks and Regards
yogesh kapil

Clecuyer
22nd June 2012, 00:19
hi ,

try this
long d1,d2,d3
d1=date.to.num(2012,06,21)
d2=date.to.num(2011,06,21)
d3=d1-d2

d3= Nbr of day between this two date

But the solution depend what kind of result you need !

bye.

ashish.k.gupta
7th August 2012, 14:15
You can try this also
usually you can subtract directly if both are having the same domain i.e. tfgld.dat or tcdate if not convert the date in same domain and then subtract
otherwise u can use this also
first get the year month day etc from date using
utc.to.date() and then
use utc.add(i.utc,-year,-month,-day,...)
but check which date is greater.