How to convert starttime in readable time...

  • example, starttime columm = 1243012622, how can I convert this columm into real time like 12.30pm or something like that.

  • What time does the example value that you posted equate to? Did you get this from one of the SQL system tables?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 12:16pm with 56 secs, SQL dbo.status table.

  • That's a table that someone built for you. It's not something any of us have access to.

    You'll need to check if the table has any documentation at your company, or if the person who built it is still working there, you can ask them.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Status is not, as far as I'm aware, a SQL system table. Speak to whoever developed that system.

    I honestly can't see how to get 12:16 pm out of that number.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Heh this is easy!

    There are 86,400 seconds in a day and 1243012622 mod 86400 = 62,222 which, taken as the number of seconds after midnight, gives us 5:17:02pm.

    The real question is, how many decimal ducks does it take to reload a wardrobe?

    Paul

  • Julio,

    Please offer us the data you see in your table and the time value you expect to see for that number. I can understand if, for instance you said "I have a number 123641, but it should show as 12:36:41". Or, maybe "have a field that's defined as a decimal number, but our software puts times in it. Now, we get a value from it like 39959.6967708333 that should be 16:43:41 on 28 May 2009."

    Just throwing random numbers at us will not allow for a considered, helpful response. There are very few telepaths frequenting this forum.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply