Showing posts with label bugging. Show all posts
Showing posts with label bugging. Show all posts

Saturday, February 25, 2012

Dates in an update statement

Hi

This is really bugging me. All I want to do is add a date in an update statement but when I do it, its adding the wrong date e.g.

here is my update statement trying to update a date field

update tbl_xset [date]=01/02/2006where id = 1
when i do this the data comes back as 1900-01-01 00:00:00.000, am I doing something wrong, what is the correct way of doing this. Thanks.

How about changing that to:

update tbl_xset [date] ='01/02/2006'where id = 1
|||try using thisupdate tbl_x set [date]='01/02/2006' where id = 1-------do not forget to mark the post as answered if it helped you|||

thanks guys that workedSmile