DateAdd documentation error?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
kdtrog
Junior Coder
Posts: 43
Joined: Wed Mar 28, 2007 9:36 am

DateAdd documentation error?

Post by kdtrog » Sat Apr 24, 2021 11:37 am

Today I stumpled over a DateAdd problem. I wondered because "DateAdd>thedate,D,1,result" did return the same day. But when I used "DateAdd>thedate,DD,1,result" the next day was returned.
Is ther a problem in the script manual examples?

kdtrog
Junior Coder
Posts: 43
Joined: Wed Mar 28, 2007 9:36 am

Re: DateAdd documentation error?

Post by kdtrog » Sat Apr 24, 2021 11:42 am

Well I found the reason. Within the script I created a variable "d". Maybe it will help somebody else in the future.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1347
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: DateAdd documentation error?

Post by Dorian (MJT support) » Sat Apr 24, 2021 12:27 pm

You'd be surprised at how many times a single letter variable assignment has caused a problem like that. Well done for getting to the bottom of it. We never stop learning. :)
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts