My simple problem is I can not add 30 days to a date:
For a button click I want to write a date in a field in a collection (today date + 30days).
I do some calc with dates working fine but this one is not working:
export function button10_click(event, $w) {
l et datenow = Date(); let days = (302460601000); let expiration = datenow+days;
$w(“#dynamicDataset”).setFieldValue(“expirationdate”, expiration); let originalDate111 = $w(“#text103”).text; let newDate111 = originalDate111.split(’ ‘).splice(0, 4).join(’ ‘);
$w(’#text103’).text = newDate111;
This way the date is always equal the current date not the current date+30 days.
Hello! I’d like to set an expiration date of 30 days from today, but I cannot tell from this thread what the final code was. Would one of you mind posting the whole code here? @yisrael-wix or @imrebellonphoto