Add/Subtract Days Based on User Submitted Date | XM Community
Skip to main content
Question

Add/Subtract Days Based on User Submitted Date

  • April 25, 2023
  • 1 reply
  • 123 views

Forum|alt.badge.img+1

Is there a way to add/subtracts day from a user submitted date in a survey without using javascript? The user submits the date in MM/DD/YYYY format. This can be passed into embedded data if needed.

 

Example: 

-User submits the following date in a survey field

04/02/2023

-I want to add 2 days into a text/graphic field or embedded data to reflect:

04/04/2023

 

From what I’ve been able to read online it appears this can only be done in relation to the current date but I’m hoping there is a solution for a user submitted date.

 

Any help is greatly appreciated.

1 reply

Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+34
  • Level 8 ●●●●●●●●
  • April 25, 2023

Can’t find any other solution except using JS. We can use Flatpickr JS for date calculations.