General information
Category:
Coding, syntax & commands
try with this procedure, but I haven't tested well so... :.)
procedure getYearMonthDay
Parameters a,b
*-- a = first date
*-- b = last date
NumYear = Year(b)-Year(a)
NumMonth = Month(b)-Month(a)
NumDay = Day(b) - Day(a)
If NumDay < 0
NumMonth = NumMonth - 1
Numday = (Gomonth(a,1)-Day(Gomonth(a,1)) - a )+ Day(b)
EndIf
If NumMonth < 0
NmYear = NumYear - 1
NumMonthi = Abs(NumMonth)
EndIf
? NumYear, NumMonth, NumDay
HTH
Alessio
>hi all,
>
>how i can compute at myform as ,
>i want to insert at (thisform.text1.value...DATE("1963/03/29"))
>(thisform.text2.value...DATE("2004/10/25"))
>
>result at thisform.text3.value=39 years
> thisform.text4.value=9 months
> thisform.text5.value=25 days
> or
>at thisform.text3.value=
> ex.. 39 9 25
>
>thanks.
>m.qasem year
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only