date function?

  • Has anyone written a function to convert dates stored as integer to a normal mm/dd/yyyy hh:mm:ss:mm?

  • If the integer format matches what SQL uses for dates you could use the convert function which supports formatting through the styles parameter.

    Andy

  • The integer fields are storing the number of seconds since Midnight Jan 1, 1970.

  • The use

    SELECT DATEADD(seconds,DateFld,'1/1/1970') AS dateoutput FROM TableX

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 4 posts - 1 through 4 (of 4 total)

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