Subforms - Date/Time

B

Beeyen

I have a situation as follows below; I am having problems mostly with coding
the conversion for the date and time to total the minute. What would suggest
as the event procedure? Or is there an easier way to accomplish the results I
am trying to achieve?

Production Completed [Date/Time field] [Check Box = Yes] Selecting the
Check Box populates the current date and time

Total Time to Complete [Total Minutes field (auto-populates)] A start time
field which has the date and time called [Assigned Time] located in another
sub-form tab, this minus the Production Completed [Date/Time] field above
equals the [Minutes] field.

So; Production Completed (in Date/Time) (minus) Assigned Time (in Date/Time)
(equals) Total Time to Complete (in minutes)

Your experience and any assistance you can provide would be greatly
appreciated.


Thanks
 
J

John W. Vinson

Total Time to Complete [Total Minutes field (auto-populates)] A start time
field which has the date and time called [Assigned Time] located in another
sub-form tab, this minus the Production Completed [Date/Time] field above
equals the [Minutes] field.

So; Production Completed (in Date/Time) (minus) Assigned Time (in Date/Time)
(equals) Total Time to Complete (in minutes)

DateDiff("n", [Assigned Time], [Production Completed])

A Date/Time field (regardless of format) is stored as a number, a count of
days and fractions of a day (times, e.g. 0.25 = 6:00am). The DateDiff function
lets you calculate time elapsed in any desired unit from seconds to years.
 
B

Beeyen

Excellent! and Thank you for the quick response.

Good Day

John W. Vinson said:
Total Time to Complete [Total Minutes field (auto-populates)] A start time
field which has the date and time called [Assigned Time] located in another
sub-form tab, this minus the Production Completed [Date/Time] field above
equals the [Minutes] field.

So; Production Completed (in Date/Time) (minus) Assigned Time (in Date/Time)
(equals) Total Time to Complete (in minutes)

DateDiff("n", [Assigned Time], [Production Completed])

A Date/Time field (regardless of format) is stored as a number, a count of
days and fractions of a day (times, e.g. 0.25 = 6:00am). The DateDiff function
lets you calculate time elapsed in any desired unit from seconds to years.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top