OL Learn

Add 7 days to a date [SOLVED]

Hello,

I’m trying to work out how to to grab a date from a file, add 7 days on to it and then display it on the template.

So far I have the code attached, I’m not JS fluent so excuse any poor syntax. If I run this in VS Code & Node.js. It works fine, but in PP the result is 10-AUG-2021NaN/undefined/NaN

Any help very much appreciated.
Thanks

Hi,

this is now solved (by myself!) and here’s the fixed version. I broke the date by adding dashes (hyphens), so I just stripped them out completely.