anandpr1989
22nd June 2015, 11:33
Hi All,

I have tried existing solutions which are present on this website related with date difference. But in my condition it's not working.

I want to calculate difference between system date and receipt date. So, please help me to resolve this.

Thanks,
Anand

bhushanchanda
22nd June 2015, 12:21
Hi,

What do you mean by System date? If its current date and time then try this -

domain tcdate sys.date | System Date
domain tcdate rec.date | Receipt Date

sys.date = utc.num()
rec.date = whinh310.ardt | Get the receipt date here. Please get the field value you require

long lng.cdat, lng.ddta, lng.ctim, lng.dtim, days.diff

utc.to.local(sys.date, lng.cdat, lng.ctim)
utc.to.local(rec.date, lng.ddta, lng.dtim)

days.diff = lng.cdat - lng.ddta

anandpr1989
22nd June 2015, 12:31
Thanks! Its working now.