Question

L

Lebowski

I have to modify date for every row as it is below

example:

1/17/2005 => 1/1/2005
9/20/2005 => 9/1/2005
9/22/2005 => 9/1/2005
2/25/2004 => 2/1/2004
10/10/2006 => 10/1/2006
....


in general: for every date, month and year must remain unchanged, but
day must be 1 (first) in every cell

Any ideas? Suggestions?
 
D

Douglas J. Steele

UPDATE MyTable
SET MyDateField = DateSerial(Year([MyDateField]), Month([MyDateField]), 1)
WHERE MyDateField IS NOT NULL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top