parames
8th April 2003, 11:41
Hi list,
How to calculate the period of two dates..

I want to get the difference between two dates , somesort like this:
domain extern tcdate days
----
days = date.num() - tdsls045.ddat
-----

the report details are like this:
tdsls045.ddat =11-04-2002
days = 28-12-0001

which means it do the calculation based to 01-01-0001...

how to get the date difference by year, month and day..
ex: 1 (year),11(months),8(days)

Thank you ...

Best Regards,
Parameswari Sellaparma

OmeLuuk
8th April 2003, 13:20
Use the date.num() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_date_to_num) and num.to.date() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_num_to_date) functions.