Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Convert to hours

Convert to hours

Scheduled Pinned Locked Moved Database
helpquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Agweet
    wrote on last edited by
    #1

    hi all...this may sound dum but i need the help...how can i convert this value "86400000" from milliseconds into hours

    living life on the flip side

    C 1 Reply Last reply
    0
    • A Agweet

      hi all...this may sound dum but i need the help...how can i convert this value "86400000" from milliseconds into hours

      living life on the flip side

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      There are 1000 milliseconds in an second There are 60 seconds in a minute There are 60 minutes in an hour 1000 * 60 * 60 = 3600000 milliseconds in an hour. I'm sure you can figure out the rest of the maths.

      Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog

      M 1 Reply Last reply
      0
      • C Colin Angus Mackay

        There are 1000 milliseconds in an second There are 60 seconds in a minute There are 60 minutes in an hour 1000 * 60 * 60 = 3600000 milliseconds in an hour. I'm sure you can figure out the rest of the maths.

        Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        Colin Angus Mackay wrote:

        I'm sure you can figure out the rest of the maths

        You only explained the maths ;) ...I believe he was looking for some cooked code :)

        int LiSeconds = 86400000;
        float LfHours = (LiSeconds / 60) / 60;

        A P 2 Replies Last reply
        0
        • M Manas Bhardwaj

          Colin Angus Mackay wrote:

          I'm sure you can figure out the rest of the maths

          You only explained the maths ;) ...I believe he was looking for some cooked code :)

          int LiSeconds = 86400000;
          float LfHours = (LiSeconds / 60) / 60;

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          ..and it was such a simple question that didn't really need asking.. :laugh:

          Bob Ashfield Consultants Ltd

          1 Reply Last reply
          0
          • M Manas Bhardwaj

            Colin Angus Mackay wrote:

            I'm sure you can figure out the rest of the maths

            You only explained the maths ;) ...I believe he was looking for some cooked code :)

            int LiSeconds = 86400000;
            float LfHours = (LiSeconds / 60) / 60;

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            We prefer not to spoon-feed people here.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups