VBA DateAdd Anomaly

GlennL

New Member
Joined
Sep 25, 2018
Messages
33
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi,

I am trying to add 3 months and 1 day to a date. For some reason, I can not see why the add doesn't work. Thoughts?

VBA Code:
debug.Print DateAdd("d", 1, now())+DateAdd("m", 1, now())
22/11/2142 8:55:48 PM 
debug.Print now()
26/05/2021 10:28:17 AM 
debug.Print DateAdd("d", 1, now())
27/05/2021 10:28:42 AM 
debug.Print DateAdd("m", 1, now())
26/06/2021 10:28:59 AM
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,515
Messages
6,125,279
Members
449,220
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top