Forum Discussion
dko71166
May 29, 2025Copper Contributor
add year month and week using just date field
I have this posting date field and I want to update yr mo and week based on posting date. I saw some suggestions online but cant make them work?
GustavBrock
May 30, 2025MVP
For year and month you can use the native functions Year and Month.
For week you may get away with DatePart("ww", [Posting Date]). However, if you wish the ISO 8601 weeknumber, a custom function is needed like my function Week found in module DateCore in my repository at GitHub: VBA.Date.
As noted, don't update a table; create and run a select query.