Add or subtract time to date variable | Community
Skip to main content
Answered

Add or subtract time to date variable

  • February 1, 2022
  • 4 replies
  • 556 views

I am having my respondents enter in a specific date, and I would like to create a variable that subtracts 4 weeks from the date, and also adds 12 weeks to that date.  I can seem to figure out a way with logic/variables.  For example if they enter 2/1/22...I would like to create variables that would calculate to 01/04/22 and 04/26/22 that I can use later in a statement. (subtracting 4 weeks and adding 4 weeks).

Best answer by john.desborough

@Liz - i did it in Google Sheets after the fact and put it into the report i sent out.

 

Working with a client now to track time spent on a series of quiz questions and it is split into two form so that we capture email and name in first form and the time stamp on submission - redirect to the timed quiz - capture the timestamp on submission of the second form. This allows me to get the duration by subtracting the first time stamp from the second. 

The same works for dates - ask for date and then add the number of days before and after to give the results in the original example above. then send out the report.. 

des

View original

4 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14960 replies
  • February 2, 2022

Oh, this is a good question @bryan92675 . @john.desborough am I going crazy (probably...) or did you have a logic jump set up to do this once? 


john.desborough
Forum|alt.badge.img+6
  • Certified Partner & Champion
  • 5296 replies
  • Answer
  • February 2, 2022

@Liz - i did it in Google Sheets after the fact and put it into the report i sent out.

 

Working with a client now to track time spent on a series of quiz questions and it is split into two form so that we capture email and name in first form and the time stamp on submission - redirect to the timed quiz - capture the timestamp on submission of the second form. This allows me to get the duration by subtracting the first time stamp from the second. 

The same works for dates - ask for date and then add the number of days before and after to give the results in the original example above. then send out the report.. 

des


  • Author
  • Explorer
  • 3 replies
  • February 2, 2022

Thanks very much for the replies, looks like only way is post quiz through google sheets.  Thanks again


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14960 replies
  • February 7, 2022

Let us know how it goes for you, @bryan92675 !


Reply