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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query not returning correct date information...for dates starting 3/1/xxxx 1

Status
Not open for further replies.

puforee

Technical User
Oct 6, 2006
741
0
0
US
I am using an update query in MS Access 2010.

Field: PC Due
Table: table_Training_Dates
Update to: DateAdd("m",1,DateSerial(Year([Base Month]),Month([Base Month]),1)-1)
My Base Month date is 3/1/1015 The update to PC Due shows 3/28/2015. It should show 3/31/2015

I run this on many different Base Month dates (All are the first of the selected month) and the PC Due dates all come out correct. Same month...but the last day of the month.

2010 does not have the EOMonth Function.

Can anyone help.
 
hi,

End of Month: DateSerial(Year([Base Month]),Month([Base Month])+1,0)

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
SkipVought...that did the trick..thanks.

I may be back with come conditional formatting issues...look for more if I run into trouble. [neutral]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top