Adding days to System.Now
Hi all, how do I add the number of days to a variable?
Let's say I set a variable "Today" = System.Now, and I want to get a variable "5DaysLater" = Today + days. How do I do that?

4 Replies
I was checking this page but nothing worked for me:
https://docs.typebot.io/editor/blocks/logic/set-variable#expressions-with-existing-variables
Set variable | Typebot docs
The "Set variable" block allows you to set a particular value to a variable.
You can use set varialble block and create a function such as
function addDays(date, days) {
var result = new Date(date);
result.setDate(result.getDate() + days);
return result;
} and adapt it to your case
Found a solution!

This is useful to know. Thanks!