Solved Change Year Only

Tieval

Still Clueless
Local time
Today, 00:27
Joined
Jun 26, 2015
Messages
475
Simple question, I have a lot of data with date/time in a field. All the data is for 2020 but I want to change it to 2019.

10/02/20 11:09:53 becomes 10/02/19 11:09:53
10/02/20 13:48:08 Becomes 10/02/19 13:48:08

Effectively a query that looks up all the dates and just changes the year, not the day, month and time.

Any help would be greatly appreciated.
 
For a really simple guess I would try using
[YourDateFIeld] = DateAdd("yyyy", -1, "[YourDatefield])
 
Where year(dateFld)= 2020,

Change to: DateAdd("yyyy",-1,dateFld)
 
Many thanks, that was easy. I was being a bit stupid and trying to extract the DataPart from it and then put it back. (y)
 

Users who are viewing this thread

Back
Top Bottom