Results 1 to 7 of 7
  1. #1
    DB7 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    6

    Formula that converts the sum of a "Time" field from 7.50, to a proper 7hrs 30min display

    Is there a formula that can do this? Any help is appreciated. Thank you.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    ?int(7.5) & "hrs " & (7.5-int(7.5)) *60 & "min"
    7hrs 30min
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Not sure about the 7.5 being a "time" field? This code works if it is a double:
    Code:
    Dim aa As String, mins As Double
    mins = 7.5 * 60
    aa = Int(mins / 60) & " hours " & Format(mins Mod 60, "00") & " minutes"

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Int(7.5) & "hrs " & (7.5-Int(7.5))*60 & "min"

    7hrs 30min

    Sorry. I should pay more attention to what's already been posted, or refresh the page if I take a break somewhere between starting and finishing.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    DB7 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    6
    Thank you Paul! This is very helpful - I will try it out!

  6. #6
    DB7 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    6
    I apologize aytee111, you are exactly right - my mistake. I was talking about a double field.
    Thanks for the formula - Ill try it out!

  7. #7
    DB7 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    6
    Thank you Micron! No problem about the extra post - It confirms what I needed. Everyone is so willing to help and I appreciate all of the replies.
    I will try the formula. Thanks again!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-13-2017, 02:20 AM
  2. Replies: 22
    Last Post: 09-04-2014, 09:12 PM
  3. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  4. How Do I Remove "Time" from a Datetime Field
    By James Parker in forum Queries
    Replies: 4
    Last Post: 01-06-2012, 03:05 PM
  5. Export to .rtf of "104-" converts to "-655&qu
    By Sherri726 in forum Import/Export Data
    Replies: 0
    Last Post: 12-19-2006, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums