Calculating Time/Pivot Charts

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to Calculate two time fields to receive a duration, But I am
not that experienced with Access 2003. I tried using a Sum function but that
didnt work, Can anyone help.

Also does anyone have a good tutorial on Pivot Charts? I am tryign to
determine how often an item is being used.
 
To calculate two times to determine a duration, you'd use the DATEDIFF
feature. See the help files for the exact syntax.

For example...
DateDiff("n",[StartTimeField],[EndTimeField])


To display a lunch duration as HH:MM, you could use the following...
=(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format((DateDiff("n",[StartLunch],[EndLunch])) Mod 60,"\:00")
 
Ok, So that would that command go in the default value to get the Duration
for every record? for Example, heres what im trying to do.

Lost Comms Time - Regained Comms Time = Total HH:MM

(I am new to calculating in Access so step by step is EXTREMELY helpful)

Rick B said:
To calculate two times to determine a duration, you'd use the DATEDIFF
feature. See the help files for the exact syntax.

For example...
DateDiff("n",[StartTimeField],[EndTimeField])


To display a lunch duration as HH:MM, you could use the following...
=(DateDiff("n",[StartLunch],[EndLunch]))\60 &
Format((DateDiff("n",[StartLunch],[EndLunch])) Mod 60,"\:00")


--
Rick B



Jason said:
I am attempting to Calculate two time fields to receive a duration, But I
am
not that experienced with Access 2003. I tried using a Sum function but
that
didnt work, Can anyone help.

Also does anyone have a good tutorial on Pivot Charts? I am tryign to
determine how often an item is being used.
 
Ok, So that would that command go in the default value to get the Duration
for every record? for Example, heres what im trying to do.

Lost Comms Time - Regained Comms Time = Total HH:MM

First off: an Access table IS NOT A SPREADSHEET.

The logical structure of a database is completely different than that
of a spreadsheet. In particular, Tables should not store derived data
at all - so you cannot and should not put this field in any Table.

Instead create a Query based on your Table. In a vacant Field cell in
the table, call the DateDiff function as suggested:

TotalTime: DateDiff("n", [Regained Comms Time], [Lost Comms Time])

This will give you an integer number of minutes between the two time
fields.

John W. Vinson[MVP]
 

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

Similar Threads

Multi Axis Pivot Chart 12
Plotting percentages in a Pivot Chart 1
Pivot Chart axes 1
HELP !!!! Calculate TIME 0
Calculation 1
Using VBA to create charts 1
Calculating Time 2
pivot charts in access 2007 1

Back
Top