R
RPMurphy
I have a form with the following text fields:
StartDate
EndDate
Total
The StartDate field uses a DatePicker, the EndDate has Date() in it's
SourceControl property. I am using this code in the Total SourceControl
property:
=DatePart("yyyy",Date())-DatePart("yyyy",[4StartDate]) & "y " &
Abs(DatePart("m",Date())-DatePart("m",[4StartDate])) & "m " &
Abs(DatePart("d",Date())-DatePart("d",[4StartDate])) & "d "
This one works, kind of, 9/27/2006 - 9/2/2009 shows a difference of 3y 0m
25d when it should
read as 2y 11m 5d...?
Can anyone shed some light on what I am missing or doing wrong? Thanks!
StartDate
EndDate
Total
The StartDate field uses a DatePicker, the EndDate has Date() in it's
SourceControl property. I am using this code in the Total SourceControl
property:
=DatePart("yyyy",Date())-DatePart("yyyy",[4StartDate]) & "y " &
Abs(DatePart("m",Date())-DatePart("m",[4StartDate])) & "m " &
Abs(DatePart("d",Date())-DatePart("d",[4StartDate])) & "d "
This one works, kind of, 9/27/2006 - 9/2/2009 shows a difference of 3y 0m
25d when it should
read as 2y 11m 5d...?
Can anyone shed some light on what I am missing or doing wrong? Thanks!