Solved Change Year Only (1 Viewer)

Tieval

Still Clueless
Local time
Today, 23:29
Joined
Jun 26, 2015
Messages
454
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.
 

Minty

AWF VIP
Local time
Today, 23:29
Joined
Jul 26, 2013
Messages
6,957
For a really simple guess I would try using
[YourDateFIeld] = DateAdd("yyyy", -1, "[YourDatefield])
 

Ranman256

Registered User.
Local time
Today, 18:29
Joined
Apr 9, 2015
Messages
3,547
Where year(dateFld)= 2020,

Change to: DateAdd("yyyy",-1,dateFld)
 

Tieval

Still Clueless
Local time
Today, 23:29
Joined
Jun 26, 2015
Messages
454
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 (Users: 0, Guests: 1)

Top Bottom