Results 1 to 3 of 3

Thread: convert number to hrs and seconds

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    Hampton Beach
    Posts
    513

    convert number to hrs and seconds

    I have a number field in my Access table, field1. Field1 shows data as seconds.

    Field1
    3600

    I want to convert this to hrs and second so it shows as
    1 hr

    How can I do this?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: convert number to hrs and seconds

    field1 / 60 / 60 = 1

    VB Code:
    1. msgbox timeserial(0,0,3600)

    gives you 1:00:00 AM

    even in WORD
    Last edited by dglienna; Feb 8th, 2005 at 11:10 PM.

  3. #3
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: convert number to hrs and seconds

    VBA Code : format(<number>,"hh:nn:ss")

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width