Problem with updating dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Selun
    New Member
    • Jan 2011
    • 6

    Problem with updating dates

    hi, and thanx in advance.

    Im trying to update a table which has Dates using

    Code:
    UPDATE Publications.Issue
    SET IssueDate=04/01/2011
    where id=48
    and i get 4/1/1900.
    used 2011-01-04, 04-01-2011 and all theese combinations, but still same kind of results.

    I figured it out that today 2011-01-04 is 40545 but i wanna have it updating using the date not the decimal value

    Im using SQL server managment studio.
    If u got any idea how to make it updating by using date type like yyyy-mm-dd or like i would apriciate it to share it with me.

    Thx.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Dates of all formats need wrapping in quotes

    Comment

    Working...