View Single Post
 
Old 10-17-2013, 08:45 AM
BoringDavid BoringDavid is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Sep 2013
Posts: 19
BoringDavid is on a distinguished road
Default 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!
Reply With Quote