Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Displaying Time and Date stamp

Is there way to display the time and date stamp for the respondent time zone in a free format question?

  <td width=200px align="left">Anket tarihi &nbsp; </td>
  <td><input name="AgencyTest_SurveyDate" id="AgencyTest_SurveyDate" type="text" size="50" value =  "[% SystemTime() %]" > </td>

Can I simply replace "[% SystemTime() %]" with something else that will populate the time and date stamp?

Thanks in advance for any guidance.
asked Nov 15, 2018 by Bryan

1 Answer

0 votes
JavaScript's Date class provides an easy way to determine the date and time in the respondent's timezone.  Here's a simple example:

<input id="datetime" value=""/>

    $('#datetime').val(new Date());

This will use JavaScript's default formatting to layout the date and time.  Rearranging the information to use different formats is possible, though.
answered Nov 15, 2018 by Zachary Platinum Sawtooth Software, Inc. (148,450 points)
Populate time/date in existing row