fmchong
15th December 2009, 10:23
Dear All,
I facing problem when calculate number of days in my report.
No of Days =tppdm600.dldt-tppdm600.stdt

example:

tppdm600.dldlt = 25-10-2009
tppdm600.stdt = 23-10-2009

no of days =2 days

Please help.

Thank you

saumya
15th December 2009, 10:37
if u calculating on report layout:
then tppdm600.dldt-tppdm600.stdt and domian should be tcorno(type long).

or in script
then

long no.of.days

no.of.days = tppdm600.dldt-tppdm600.stdt

norwim
15th December 2009, 10:43
Hi there,

if I understand correctly, fmchong's problem is that the substraction gives two days whereas he expects to find a duration of 3 days - well this is a matter of perspective and can mathematically be solved by calculating
no of days=dldt-stdt+1 :-)

hth

Norbert

fmchong
16th December 2009, 11:18
Dear All,
i tried but result is 0. please refer to attachement.

thank you

mark_h
16th December 2009, 14:34
Not sure about this since we are on 4c4, but are these utc dates? Try this thread here (http://www.baanboard.com/baanboard/showthread.php?t=34009&highlight=utc+dates) for how to get the difference in days. Not sure if this is applicable or not.

fmchong
21st December 2009, 10:24
Dear All,
Thank you very much. My problem resolved.