Results 1 to 7 of 7

Thread: How to convert Time from int to Real-time

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Quote Originally Posted by nosepicker
    I have an ugly, but hopefully correct way of converting those times:
    Thank you for that, it makes my method look not hacky at all in comparison

  2. #2
    Join Date
    Oct 2007
    Posts
    3

    Maximum obfuscation

    Wow, I've written some pretty ugly T/SQL but nosepicker's surpasses all. -- although, it does appear to work. I wouldn't put anything like it into production.

  3. #3
    Join Date
    Oct 2007
    Posts
    3

    Suggested syntax - revision 1

    This example takes a julian date, expressed as a decimal, and converts it to human readable hour with meridian:

    select substring(cast(convert(datetime, 39750.33333335, 101) as varchar),13,20)

Posting Permissions

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