Results 1 to 5 of 5
  1. #1
    Sailor is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2014
    Posts
    5

    Converting Seconds to H M S in a report?

    Howdy,

    Please bear with me, as I know this must be a REALLY simple thing to do. I have a field in my table to store a time in seconds. In my report, I want the field to be displayed as Hours.Minutes.Seconds. I have been searching, and understand the basic calculation as below (and this is what I used to do in Excel). I just don't know specifically WHERE the formula is applied. Do I have to create a new table column in the db? I don't really want to store the value...just display the more user friendly version in a report.

    Format([Hold]/86400, "hh:mm:ss")

    If someone is willing to show me where this goes, it would be appreciated!

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,928
    if it is a calculated value (as opposed to a value you want in a table instead of the number of seconds), you just use it in a query, form or report as required - the formula you have looks OK as is)

  3. #3
    Sailor is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2014
    Posts
    5
    Quote Originally Posted by Ajax View Post
    if it is a calculated value (as opposed to a value you want in a table instead of the number of seconds), you just use it in a query, form or report as required - the formula you have looks OK as is)
    Thanks for the quick response...I need baby steps here....

    My report is bound to a query, which does report the "Hold" field, which is in seconds. On the report, I want the field to display the H M S instead. Do I leave the current "Hold" field on the report, and somehow apply this formula and format?

  4. #4
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,928
    I would put it in the query something like

    hmsHold:Format([Hold]/86400, "hh:mm:ss")


    and use hmsHold on your report. If you are not using Hold for anything else on your report, then no need to bring it through in query since you are using hmsHold instead

  5. #5
    Sailor is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2014
    Posts
    5
    OK, Now I've got it! Thanks Ajax.

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

Similar Threads

  1. Replies: 7
    Last Post: 06-27-2013, 10:56 AM
  2. Convert seconds to DD:HH:MM:SS
    By rockcliff15 in forum Access
    Replies: 6
    Last Post: 04-23-2012, 01:27 PM
  3. Convert seconds to HH:MM:SS format
    By sai_rlaf in forum Access
    Replies: 2
    Last Post: 01-19-2012, 12:57 AM
  4. Converting large report to PDF
    By jgelpi16 in forum Reports
    Replies: 2
    Last Post: 07-05-2011, 12:09 PM
  5. Form opens for only seconds
    By MFS in forum Programming
    Replies: 5
    Last Post: 11-04-2010, 09:33 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