Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Format an Access calculation to display in full 24 hour mode

 
   Database Help (Home) -> MS Access RSS
Next:  Oracle Enterprise Manager for Oracle 9i  
Author Message
AccessIM

External


Since: Feb 04, 2005
Posts: 1



(Msg. 1) Posted: Tue Feb 08, 2005 10:23 am
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: microsoft>public>access (more info?)

Doug-

I am having this same problem and you reply sounds very helpful. My problem
is that I am not too familiar with Visual Basic and code. I work in design
view when creating and modifying my databases. Can you tell me how to solve
this problem in design view or give a little more detail as to how I can use
that code in Visual Basic? Thanks in advance.

"Douglas J. Steele" wrote:

 > Actually, that won't work George: you're getting 24 hours for each day in
 > interval, but you're missing the hours themselves.
 >
 > Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
 > Format(Minute(Interval), "00") & ":" & _
 > Format(Second(Interval), "00")
 >
 > --
 > Doug Steele, Microsoft Access MVP
<font color=purple> > <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
 > (no e-mails, please!)
 >
 >
 >


  > > One way to get a hh:mm:ss total to display hours greater than 24 in
  > > Access:
  > > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
  > > Where Interval is some measure of time (a sum, difference, etc.)
  > >
<font color=green>  > > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
  > > How to store, calculate, and compare Date/Time data in Microsoft Access
  > > (the above is a variation from the "ElapsedTime" function in that article)
  > >
  > > And/or:
<font color=green>  > > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
  > > "On time and how much has elapsed"
  > >
  > > HTH,
  > > --
  > > George Nicholson
  > >
  > > Remove 'Junk' from return address.
  > >
  > >


   > >> How can a formula be formatted to display in 24 hours only. Using short
   > >> time
   > >> format when you add up hours in excess of 24 it reverts to day/hour
   > >> format.
   > >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am using
   > >> the
   > >> database to add up employee hours who are paid on an hourly rate & these
   > >> can
   > >> range from 6 to 50+.
   > >>
   > >> Phil
  > >
  > >
 >
 >
 >

 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Joel den Braber

External


Since: Feb 08, 2005
Posts: 2



(Msg. 2) Posted: Tue Feb 08, 2005 3:40 pm
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"AccessIM" schreef in bericht

 > Doug-
 >
 > I am having this same problem and you reply sounds very helpful. My
problem
 > is that I am not too familiar with Visual Basic and code. I work in
design
 > view when creating and modifying my databases. Can you tell me how to
solve
 > this problem in design view or give a little more detail as to how I can
use
 > that code in Visual Basic? Thanks in advance.
 >
 > "Douglas J. Steele" wrote:
 >
  > > Actually, that won't work George: you're getting 24 hours for each day
in
  > > interval, but you're missing the hours themselves.
  > >
  > > Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
  > > Format(Minute(Interval), "00") & ":" & _
  > > Format(Second(Interval), "00")
  > >
  > > --
  > > Doug Steele, Microsoft Access MVP
<font color=green>  > > <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
  > > (no e-mails, please!)
  > >
  > >
  > >


   > > > One way to get a hh:mm:ss total to display hours greater than 24 in
   > > > Access:
   > > > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
   > > > Where Interval is some measure of time (a sum, difference, etc.)
   > > >
<font color=brown>   > > > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
   > > > How to store, calculate, and compare Date/Time data in Microsoft
Access
   > > > (the above is a variation from the "ElapsedTime" function in that
article)
   > > >
   > > > And/or:
<font color=brown>   > > > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
   > > > "On time and how much has elapsed"
   > > >
   > > > HTH,
   > > > --
   > > > George Nicholson
   > > >
   > > > Remove 'Junk' from return address.
   > > >
   > > >


   > > >> How can a formula be formatted to display in 24 hours only. Using
short
   > > >> time
   > > >> format when you add up hours in excess of 24 it reverts to day/hour
   > > >> format.
   > > >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am
using
   > > >> the
   > > >> database to add up employee hours who are paid on an hourly rate &
these
   > > >> can
   > > >> range from 6 to 50+.
   > > >>
   > > >> Phil
   > > >
   > > >
  > >
  > >
  > >

 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Douglas J. Steele

External


Since: Mar 14, 2004
Posts: 1626



(Msg. 3) Posted: Tue Feb 08, 2005 6:40 pm
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm sorry: I don't understand what you mean by "work in design view".

--
Doug Steele, Microsoft Access MVP
<a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele" target="_blank">http://I.Am/DougSteele</a>
(no e-mails, please!)



"AccessIM" wrote in message

 > Doug-
 >
 > I am having this same problem and you reply sounds very helpful. My
 > problem
 > is that I am not too familiar with Visual Basic and code. I work in
 > design
 > view when creating and modifying my databases. Can you tell me how to
 > solve
 > this problem in design view or give a little more detail as to how I can
 > use
 > that code in Visual Basic? Thanks in advance.
 >
 > "Douglas J. Steele" wrote:
 >
  >> Actually, that won't work George: you're getting 24 hours for each day in
  >> interval, but you're missing the hours themselves.
  >>
  >> Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
  >> Format(Minute(Interval), "00") & ":" & _
  >> Format(Second(Interval), "00")
  >>
  >> --
  >> Doug Steele, Microsoft Access MVP
<font color=green>  >> <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
  >> (no e-mails, please!)
  >>
  >>
  >>


   >> > One way to get a hh:mm:ss total to display hours greater than 24 in
   >> > Access:
   >> > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
   >> > Where Interval is some measure of time (a sum, difference, etc.)
   >> >
<font color=brown>   >> > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
   >> > How to store, calculate, and compare Date/Time data in Microsoft Access
   >> > (the above is a variation from the "ElapsedTime" function in that
   >> > article)
   >> >
   >> > And/or:
<font color=brown>   >> > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
   >> > "On time and how much has elapsed"
   >> >
   >> > HTH,
   >> > --
   >> > George Nicholson
   >> >
   >> > Remove 'Junk' from return address.
   >> >
   >> >


   >> >> How can a formula be formatted to display in 24 hours only. Using
   >> >> short
   >> >> time
   >> >> format when you add up hours in excess of 24 it reverts to day/hour
   >> >> format.
   >> >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am
   >> >> using
   >> >> the
   >> >> database to add up employee hours who are paid on an hourly rate &
   >> >> these
   >> >> can
   >> >> range from 6 to 50+.
   >> >>
   >> >> Phil
   >> >
   >> >
  >>
  >>
  >>
 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Phil50

External


Since: Aug 18, 2004
Posts: 7



(Msg. 4) Posted: Thu Feb 10, 2005 11:35 am
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Doug

The link to the web page & the sample database has answered my query,
thanks. However, I now have another problem when I try to multiply hours by
hourly rate it is not giving the correct answer, I guess it is some sort of
formatting problem but I can't crack it, any ideas please.

Phil

"Douglas J. Steele" wrote:

 > Actually, that won't work George: you're getting 24 hours for each day in
 > interval, but you're missing the hours themselves.
 >
 > Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
 > Format(Minute(Interval), "00") & ":" & _
 > Format(Second(Interval), "00")
 >
 > --
 > Doug Steele, Microsoft Access MVP
<font color=purple> > <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
 > (no e-mails, please!)
 >
 >
 >


  > > One way to get a hh:mm:ss total to display hours greater than 24 in
  > > Access:
  > > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
  > > Where Interval is some measure of time (a sum, difference, etc.)
  > >
<font color=green>  > > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
  > > How to store, calculate, and compare Date/Time data in Microsoft Access
  > > (the above is a variation from the "ElapsedTime" function in that article)
  > >
  > > And/or:
<font color=green>  > > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
  > > "On time and how much has elapsed"
  > >
  > > HTH,
  > > --
  > > George Nicholson
  > >
  > > Remove 'Junk' from return address.
  > >
  > >


   > >> How can a formula be formatted to display in 24 hours only. Using short
   > >> time
   > >> format when you add up hours in excess of 24 it reverts to day/hour
   > >> format.
   > >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am using
   > >> the
   > >> database to add up employee hours who are paid on an hourly rate & these
   > >> can
   > >> range from 6 to 50+.
   > >>
   > >> Phil
  > >
  > >
 >
 >
 >
 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Douglas J. Steele

External


Since: Mar 14, 2004
Posts: 1626



(Msg. 5) Posted: Fri Feb 11, 2005 5:40 am
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

What sort of error? It's hard to offer suggestions without knowing what the
problem is...

--
Doug Steele, Microsoft Access MVP
<a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele" target="_blank">http://I.Am/DougSteele</a>
(no e-mails, please!)



"Phil" wrote in message

 > Doug
 >
 > The link to the web page & the sample database has answered my query,
 > thanks. However, I now have another problem when I try to multiply hours
 > by
 > hourly rate it is not giving the correct answer, I guess it is some sort
 > of
 > formatting problem but I can't crack it, any ideas please.
 >
 > Phil
 >
 > "Douglas J. Steele" wrote:
 >
  >> Actually, that won't work George: you're getting 24 hours for each day in
  >> interval, but you're missing the hours themselves.
  >>
  >> Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
  >> Format(Minute(Interval), "00") & ":" & _
  >> Format(Second(Interval), "00")
  >>
  >> --
  >> Doug Steele, Microsoft Access MVP
<font color=green>  >> <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
  >> (no e-mails, please!)
  >>
  >>
  >>


   >> > One way to get a hh:mm:ss total to display hours greater than 24 in
   >> > Access:
   >> > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
   >> > Where Interval is some measure of time (a sum, difference, etc.)
   >> >
<font color=brown>   >> > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
   >> > How to store, calculate, and compare Date/Time data in Microsoft Access
   >> > (the above is a variation from the "ElapsedTime" function in that
   >> > article)
   >> >
   >> > And/or:
<font color=brown>   >> > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
   >> > "On time and how much has elapsed"
   >> >
   >> > HTH,
   >> > --
   >> > George Nicholson
   >> >
   >> > Remove 'Junk' from return address.
   >> >
   >> >


   >> >> How can a formula be formatted to display in 24 hours only. Using
   >> >> short
   >> >> time
   >> >> format when you add up hours in excess of 24 it reverts to day/hour
   >> >> format.
   >> >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am
   >> >> using
   >> >> the
   >> >> database to add up employee hours who are paid on an hourly rate &
   >> >> these
   >> >> can
   >> >> range from 6 to 50+.
   >> >>
   >> >> Phil
   >> >
   >> >
  >>
  >>
  >>
 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Phil50

External


Since: Aug 18, 2004
Posts: 7



(Msg. 6) Posted: Fri Feb 11, 2005 11:51 am
Post subject: Re: Format an Access calculation to display in full 24 hour [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Doug
I am trying to find a calculation to muliply the total hours (derived by
using 'HoursAndMinutes format), by a currency rate i.e £3.55, to give a total
wage. Even though I format the field as currency, because I am using the
'HAM' format, this overrides it and I get a result that is incorrect showing
as xx:xx.
Hope this makes sense!

Phil

"Douglas J. Steele" wrote:

 > What sort of error? It's hard to offer suggestions without knowing what the
 > problem is...
 >
 > --
 > Doug Steele, Microsoft Access MVP
<font color=purple> > <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
 > (no e-mails, please!)
 >
 >
 >


  > > Doug
  > >
  > > The link to the web page & the sample database has answered my query,
  > > thanks. However, I now have another problem when I try to multiply hours
  > > by
  > > hourly rate it is not giving the correct answer, I guess it is some sort
  > > of
  > > formatting problem but I can't crack it, any ideas please.
  > >
  > > Phil
  > >
  > > "Douglas J. Steele" wrote:
  > >
   > >> Actually, that won't work George: you're getting 24 hours for each day in
   > >> interval, but you're missing the hours themselves.
   > >>
   > >> Int(CSng(Interval*24)) + Hour(Interval) & ":" & _
   > >> Format(Minute(Interval), "00") & ":" & _
   > >> Format(Second(Interval), "00")
   > >>
   > >> --
   > >> Doug Steele, Microsoft Access MVP
<font color=brown>   > >> <a rel="nofollow" style='text-decoration: none;' href="http://I.Am/DougSteele</font" target="_blank">http://I.Am/DougSteele</font</a>>
   > >> (no e-mails, please!)
   > >>
   > >>
   > >>


   > >> > One way to get a hh:mm:ss total to display hours greater than 24 in
   > >> > Access:
   > >> > Int(CSng(Interval*24)) & ":" & Format(Interval, "nn:ss")
   > >> > Where Interval is some measure of time (a sum, difference, etc.)
   > >> >
<font color=brown>   > >> > <a rel="nofollow" style='text-decoration: none;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;210276</font</a>>
   > >> > How to store, calculate, and compare Date/Time data in Microsoft Access
   > >> > (the above is a variation from the "ElapsedTime" function in that
   > >> > article)
   > >> >
   > >> > And/or:
<font color=brown>   > >> > <a rel="nofollow" style='text-decoration: none;' href="http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font" target="_blank">http://office.microsoft.com/en-us/assistance/HA011102181033.aspx</font</a>>
   > >> > "On time and how much has elapsed"
   > >> >
   > >> > HTH,
   > >> > --
   > >> > George Nicholson
   > >> >
   > >> > Remove 'Junk' from return address.
   > >> >
   > >> >


   > >> >> How can a formula be formatted to display in 24 hours only. Using
   > >> >> short
   > >> >> time
   > >> >> format when you add up hours in excess of 24 it reverts to day/hour
   > >> >> format.
   > >> >> i.e 25 hours 30 min shows as 01:30 (1 day, 1 hour & 30mins). I am
   > >> >> using
   > >> >> the
   > >> >> database to add up employee hours who are paid on an hourly rate &
   > >> >> these
   > >> >> can
   > >> >> range from 6 to 50+.
   > >> >>
   > >> >> Phil
   > >> >
   > >> >
   > >>
   > >>
   > >>
 >
 >
 >
 >> Stay informed about: Format an Access calculation to display in full 24 hour mode 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Can't Add "Mode" to Quick Access Toolbar in MS-Access 2007 - I keep selecting and selecting, but it just doesn't show up. I also have no button in the ribbon for this, or any ability to get into other modes via the Office button. It's very frustrating; I had to search online for a keyboard shortcut to be able to..

Converting Day Hour Minutes to Minutes in Excel or Access -

Calculation for an Access Report - I have a unique calculation I need to produce and have the results appear on an Access Report. I need to take the value of a value in a column and essentially do the following: if the value in the column is 15 - 20, assign a point value of 1 if the valu...

will the runtime for access 2007 interfeer with access 200.. - Hi, I understand that the runtime will be free with access 2007. I wonder about the following scenario: A user will have the full version of access 2003 installed (or an earlier version). A developer will offer an acess 2007 application, and suggest to....

MS Access in multi-user mode.. - I can't get MS Access into multi-user mode even though I have the DB set to multi-user under Tools/Advanced. Please help. Thanks.
   Database Help (Home) -> MS Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]