General information
Category:
Coding, syntax & commands
Kirk:
The last code I send you had an error. You must replace this 3 lines:
nHowManyYears = IIF(nCurMonth > nBirthMonth, nCurYear - nBirthYear, (nCurYear - nBirthYear) -1)
nHowManyMonths = IIF(nCurMonth > nBirthMonth, nCurMonth-nBirthMonth, (12-nBirthMonth) + nCurMonth)
nHowManyDays = IIF(nCurDay > nBirthDay , nCurDay-nBirthDay , (nDaysInMonth-nBirthDay)+nCurDay)
with this:
IF nCurDay => nBirthDay
nHowManyDays = nCurDay-nBirthDay
IF nCurMonth => nBirthMonth
nHowManyMonths = nCurMonth-nBirthMonth
nHowManyYears = nCurYear - nBirthYear
ELSE
nHowManyMonths = (12-nBirthMonth) + nCurMonth
nHowManyYears = (nCurYear - nBirthYear) -1
ENDIF
ELSE
nHowManyDays = (nDaysInMonth-nBirthDay)+nCurDay
nHowManyMonths = IIF(nCurMonth > nBirthMonth, nCurMonth-nBirthMonth-1, (12-nBirthMonth) + nCurMonth - 1)
nHowManyYears = IIF(nHowManyMonths = 0, nCurYear - nBirthYear, nCurYear - nBirthYear - 1)
ENDIF
Sorry
mandy
Previous
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