indian_sumesh
24th July 2007, 06:31
Hi Baan Friends

I wants to calculate difference between two dates inputed by user
like 15/07/2007 to 20/07/2007 (DD/MM/YYYY) then how can I get the
difference as no. of days = 5

Thanks & reagards
Sumesh

bigjack
24th July 2007, 07:06
Hi,

Use function inputstr.to.date(date2,format) - inputstr.to.date( date1,format).

Match the format with the one in your system.

Bye

ks_ks_
24th July 2007, 07:25
go to
http://www.baanboard.com/baanboard/showthread.php?s=&threadid=9832


You will be able to find the solution for your problem.

rodolfo
24th July 2007, 15:56
Hi Baan Friends

I wants to calculate difference between two dates inputed by user
like 15/07/2007 to 20/07/2007 (DD/MM/YYYY) then how can I get the
difference as no. of days = 5

Thanks & reagards
Sumesh
Hello Sumesh
If I understood your question, I think I can help you:
Dates in Baan are stored as long number since 1-1-0001, so if you make arithmetical operation between dates, as a result you will obtain a long number.

ex:
long diff.c
domain tcdate date.from | 15-7
domain tcdate date.to | 20-7

diff.c = date.to - date.from


Good Luck, and best regards
Rodolfo

indian_sumesh
25th July 2007, 11:53
Thanks,
That is what i was looking for!!!!!