Convert to Date

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Service Tech

    Convert to Date

    I have a variable that I am passing to a stored procedure from a
    propritery software application. The variable it passes is the number
    of days that have passed since 1/1/1900. I cannot seem to locate a
    convert statement that is applicable. Any guidance would be greatly
    appreciated.


    Thanks
  • David Portas

    #2
    Re: Convert to Date

    DATEADD(DAY,@va r,'19000101')

    or

    DATEADD(DAY,@va r,'18991231')

    depending on whether 1900-01-01 is represented by 0 or 1.

    --
    David Portas
    SQL Server MVP
    --


    Comment

    Working...