J
Jose
Exists a function that determined between two dates the years,months and
days?
Thanks a lot.
days?
Thanks a lot.
Scott said:dim x as date = someDate.subtract(someOtherDate)
Chris said:The Subtract method on the DateTime structure, when passed another
DateTime, returns a Timespan object and not a DateTime object.
Dim ts As TimeSpan = someDate.Subtract(someOtherDate)
Then you can get the years, months, and days properties from the
TimeSpan.
Göran Andersson said:Actually, you can only get the value as days.
Chris said:I stand corrected. But when you subtract a date from another date, it
returns a Timespan and not a date.
Göran Andersson said:Yes. If you read my next sentence you see that I am referring to the
TimeSpan structure. That implies that I concur with your observation.