date is 01/01/1900

I'm updating a row in sql2k and its updating my date field to 01/01/1900 no matter what I specify. Am I doing this correctly:

UPDATE Purchase SET DOP = 25/03/2003 WHERE Code = 'code02'

I'm using query analyzer also, same thing, although row updated successfully is 1.
0
supergal
8/1/2003 4:43:54 AM
asp.net.object-datasource 16182 articles. 0 followers. Follow

1 Replies
844 Views

Similar Articles

[PageSpeed] 9

> UPDATE Purchase SET DOP = 25/03/2003 WHERE Code = 'code02' 

try :
UPDATE Purchase SET DOP = '25/03/2003' WHERE Code = 'code02'
or in access
UPDATE Purchase SET DOP = #25/03/2003# WHERE Code = 'code02'
though I usually try to use non-ambiguos date formats e.g.
UPDATE Purchase SET DOP = '25 March 2003' WHERE Code = 'code02'

j
RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadable

Jason Brown - MVP, IIS
0
Atrax
8/1/2003 8:50:56 AM
Reply: