I have 3 text boxes;
starttime and endTime for formatted as Long Time
Duration is formatted as Shorttime, just interested in minutes and seconds.
Just read Allen Browne's article Calculating Elapsed Time which reads:
Let's assume a date/time field named StartDateTime to record when the employee clocks on, and another named EndDateTime for when the employee clocks off. To calculate the time worked, create a query into this table, and type this into the Field row of the query design grid:
Minutes: DateDiff("n", [StartDateTime], [EndDateTime])
Minutes is the alias for the calculated field; you could use any name you like. You must use "n" for DateDiff() to return minutes: "m" returns months.
To display this value as hours and minutes on your report, use a text box with this Control Source:
=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")
I don't understand what he means buy "create a query into this table", what table? I don't think what I want is rocket science, but I can't figure it out.
Any help would be greatly appreciated
starttime and endTime for formatted as Long Time
Duration is formatted as Shorttime, just interested in minutes and seconds.
Just read Allen Browne's article Calculating Elapsed Time which reads:
Let's assume a date/time field named StartDateTime to record when the employee clocks on, and another named EndDateTime for when the employee clocks off. To calculate the time worked, create a query into this table, and type this into the Field row of the query design grid:
Minutes: DateDiff("n", [StartDateTime], [EndDateTime])
Minutes is the alias for the calculated field; you could use any name you like. You must use "n" for DateDiff() to return minutes: "m" returns months.
To display this value as hours and minutes on your report, use a text box with this Control Source:
=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")
I don't understand what he means buy "create a query into this table", what table? I don't think what I want is rocket science, but I can't figure it out.
Any help would be greatly appreciated