To calculate number of months between 2 different dates
Could anyone tell me, how to calculate between two dates for example:
date of birth - today's date = # of months
It depends on how you define "month". Try, for example:
12 * ( Year ( today ) - Year ( DOB ) ) + Month ( today ) - Month ( DOB ) - ( Day ( today ) < Day ( DOB ) )
This is based on the assumption that a person becomes a month older on the same day-of-month as his birthday or when the month ends - whichever happens first.
Retrieving data ...