update query to add one day

davidcantor
3StarLounger
Posts: 247
Joined: 05 Nov 2012, 19:40

update query to add one day

Post by davidcantor »

I am running an update query to add one day to a date field and I get type conversion error.

Code: Select all

UPDATE AmountsInfo SET AmountsInfo.[IDATE] = DateAdd("d",1,[TDate]), AmountsInfo.TDate = "";
The update query should add one day to the Tdate and store that in the Idate field then clear the Tdate field.

davidcantor
3StarLounger
Posts: 247
Joined: 05 Nov 2012, 19:40

Re: update query to add one day

Post by davidcantor »

fixed this by adding null instead of ""

User avatar
HansV
Administrator
Posts: 78532
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: update query to add one day

Post by HansV »

That was quick! :smile:
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: update query to add one day

Post by Rudi »

I guess there was nothing (null) to fix :laugh:
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.