Calculating age of something from a Date Picker
My company uses Word VBA to create templates for our customer service letters. In one of them I use a Date Picker to input the start date of a policy, but also need to calculate the age of that policy in years. I have tried use:
b = Format(Me.DTPStartDate.Value, "d MMMM yyyy")
c = Format(Val(Date - Me.DTPStartDate.Value), "y")
Where c is the age of the policy
Any help would be much appreciated!
|