Calculate the Date

lerwane

Registered User.
Local time
Today, 14:55
Joined
Jan 9, 2004
Messages
22
can anybody help me?

this is the scenario:

in table1 these are the fields (date_start, date_end, total_yrs, total_mos)

in input form the user will fill-up only 2 fields (date_start, date_end) e.g. Date_Start: 1/1/2004 Date_End: 3/1/2006

now, i want to get the total months and years basing from that data and put the data into fields total_yrs and total _mos.

Meaning between 1/1/2004 and 3/1/2006 the output should be:

Total_yrs: 2 Total_mos: 2

The data types that i used for Date_Start and Date_End are Date/Time.

Please help me. Thanks
 
You don't need the fields total_yrs and total_mos in your table as this would violate Third Normal Form (3NF).

You can easily calculate the months and years anytime within a query, form, or report as you need it by using the DateDiff() function. Have a look at this function in the help files.
 
thanks

Mile-O-Phile

thanks a lot! :)
 

Users who are viewing this thread

Back
Top Bottom