Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Day to 15 without affecting Month or year in date field.

Status
Not open for further replies.

nstouffer

Programmer
Jan 11, 2002
52
0
0
US
I have a date field "RecheckDate" in SQL. I need to update the Day to 15 for all rows.

05/31/02 will become 05/15/02
06/24/02 06/15/02
08/23/02 08/15/02

What is the best function to use to accomplish this?

I had trouble using the Day(Recheck) = 15 function in
an update query, can anyone help?

nstouffer
 
what about

update yourtable
set RecheckDate = RecheckDate-day(RecheckDate)+15

Andy
 
Worked excellent!
Thank you so much!
nstouffer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top