A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Percentages on time calculations



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2010, 03:45 AM posted to microsoft.public.access.reports
PamB
external usenet poster
 
Posts: 15
Default Percentages on time calculations

Access 2007 - I have a report that calculates downtime based on a combination
of Date&Time Up minus Date&Time Down:

=(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " & [TimeUp]))\60
& ":" & Format((DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp])) Mod 60,"00")

(Thankyou to the gurus on this discussion board who haved helped other
people with this!)

The report is currently grouped according to Downtime Code and calculates
totals for each group. I have the following in the footer of each group:

=Sum(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60 & ":" & Format(Sum(DateDiff("n",[DateDown] & " " &
[TimeDown],[DateUp] & " " & [TimeUp])) Mod 60,"00")

which is working nicely.

I now want to calculate the percentage of downtime for each group against
the total downtime for the period selected (via a parameter form).

I have tried various options but have managed to get exactly nowhere with
them.

Am I asking too much to calculate percentages on time values? Any help would
be greatly appreciated. Thank you in advance!

--
cheers
pamb
  #2  
Old April 8th, 2010, 04:39 AM posted to microsoft.public.access.reports
PamB
external usenet poster
 
Posts: 15
Default Percentages on time calculations

Actually - having had a think about this, it would be way easier if there was
a way to convert the calculated time (ie: 4:45hrs) to a decimal value (ie:
4.75hrs) and use that in all my other reports and things I would like to
create.....

Please help!
--
cheers
pamb


"PamB" wrote:

Access 2007 - I have a report that calculates downtime based on a combination
of Date&Time Up minus Date&Time Down:

=(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " & [TimeUp]))\60
& ":" & Format((DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp])) Mod 60,"00")

(Thankyou to the gurus on this discussion board who haved helped other
people with this!)

The report is currently grouped according to Downtime Code and calculates
totals for each group. I have the following in the footer of each group:

=Sum(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60 & ":" & Format(Sum(DateDiff("n",[DateDown] & " " &
[TimeDown],[DateUp] & " " & [TimeUp])) Mod 60,"00")

which is working nicely.

I now want to calculate the percentage of downtime for each group against
the total downtime for the period selected (via a parameter form).

I have tried various options but have managed to get exactly nowhere with
them.

Am I asking too much to calculate percentages on time values? Any help would
be greatly appreciated. Thank you in advance!

--
cheers
pamb

  #3  
Old April 8th, 2010, 04:49 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Percentages on time calculations

Then get rid of all of the formatting
=DateDiff("n",[DateDown]+[TimeDown],[DateUp]+[TimeUp])\60

--
Duane Hookom
MS Access MVP


"PamB" wrote in message
...
Actually - having had a think about this, it would be way easier if there
was
a way to convert the calculated time (ie: 4:45hrs) to a decimal value (ie:
4.75hrs) and use that in all my other reports and things I would like to
create.....

Please help!
--
cheers
pamb


"PamB" wrote:

Access 2007 - I have a report that calculates downtime based on a
combination
of Date&Time Up minus Date&Time Down:

=(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60
& ":" & Format((DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " "
&
[TimeUp])) Mod 60,"00")

(Thankyou to the gurus on this discussion board who haved helped other
people with this!)

The report is currently grouped according to Downtime Code and calculates
totals for each group. I have the following in the footer of each group:

=Sum(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60 & ":" & Format(Sum(DateDiff("n",[DateDown] & " " &
[TimeDown],[DateUp] & " " & [TimeUp])) Mod 60,"00")

which is working nicely.

I now want to calculate the percentage of downtime for each group against
the total downtime for the period selected (via a parameter form).

I have tried various options but have managed to get exactly nowhere with
them.

Am I asking too much to calculate percentages on time values? Any help
would
be greatly appreciated. Thank you in advance!

--
cheers
pamb


  #4  
Old April 8th, 2010, 05:46 AM posted to microsoft.public.access.reports
PamB
external usenet poster
 
Posts: 15
Default Percentages on time calculations

Thank you so much Duane.

I had taken out the formatting from the reports but hadn't taken it out of
the base queries.

Just a small thing for anybody else who reads this.... you need to use / not
\ to get the decimal places correct.

This has been most helpful! I cannot thank you enough.

--
cheers
pamb


"Duane Hookom" wrote:

Then get rid of all of the formatting
=DateDiff("n",[DateDown]+[TimeDown],[DateUp]+[TimeUp])\60

--
Duane Hookom
MS Access MVP


"PamB" wrote in message
...
Actually - having had a think about this, it would be way easier if there
was
a way to convert the calculated time (ie: 4:45hrs) to a decimal value (ie:
4.75hrs) and use that in all my other reports and things I would like to
create.....

Please help!
--
cheers
pamb


"PamB" wrote:

Access 2007 - I have a report that calculates downtime based on a
combination
of Date&Time Up minus Date&Time Down:

=(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60
& ":" & Format((DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " "
&
[TimeUp])) Mod 60,"00")

(Thankyou to the gurus on this discussion board who haved helped other
people with this!)

The report is currently grouped according to Downtime Code and calculates
totals for each group. I have the following in the footer of each group:

=Sum(DateDiff("n",[DateDown] & " " & [TimeDown],[DateUp] & " " &
[TimeUp]))\60 & ":" & Format(Sum(DateDiff("n",[DateDown] & " " &
[TimeDown],[DateUp] & " " & [TimeUp])) Mod 60,"00")

which is working nicely.

I now want to calculate the percentage of downtime for each group against
the total downtime for the period selected (via a parameter form).

I have tried various options but have managed to get exactly nowhere with
them.

Am I asking too much to calculate percentages on time values? Any help
would
be greatly appreciated. Thank you in advance!

--
cheers
pamb


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.