Jump to content

This topic is 7099 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

How do I subtract a date from a date and get an answer by Years / Months / Days.

Example:

1-1-04 subtracted from 8-1-05 returns

1 year 7 months 0 days

Thank you,

Joseph

Posted

to get the year you would:

(right(date2, 2))-(right(date, 2)

and so on with the day and month then recombine.

Try testing that with dates such as:

date1 = 11-1-04 , date2 = 1-1-05

date1 = 1-13-05 , date2 = 2-1-05

date1 = 1-1-99 , date2 = 1-1-01

To get the year of a date field = Year(date1)

Posted

Ok I know I should Understand all of that but I really do not... I have tried the example does not work the way I thought it would. Any other help on this subject would be very helpful.

Thanks,

Joseph

This topic is 7099 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.