Brad Gronli Posted December 2, 2021 Posted December 2, 2021 Have an odd situation where subtracting one day from 20211201 ends up with an invalid date. -SET &PREVDT = DATEADD(20211201, D, -1); -SET &TEMP2 = 20211200; Any ideas as to why DATEADD subtracting one day from the current date, when the current date was 20211201 would come up with a date of 20211200
David Beagan Posted December 2, 2021 Posted December 2, 2021 This Focal Point post explains this issue. The date needs to be converted to an internal date format to work with DATEADD, then converted back to store in the variable. I find it simpler to use the AYMD function: -SET &Yesterday = AYMD(&YYMD, -1, 'I8YYMD'); -TYPE Yesterday = &Yesterday
Charles Morris 2 Posted December 2, 2021 Posted December 2, 2021 If I recall correctly, DATEADD doesnt always work correctly with Dialogue Mgr, even if you change the date to internal format
Sarah Buccellato Posted December 7, 2021 Posted December 7, 2021 Hi Brad, were David and Charless posts helpful
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now