• Each lead is stamped with the ‘created at’ time stamp.
  • However, there is no way to call this field in your Decision Tree.
  • So let’s examine the case where you need to use your own time stamp custom field.
  1. Simply create a text field called ‘timestamp’
  2. And then copy/paste this code into a node script
var Time = new Date().toLocaleString("en-US", {timeZone: "America/New_York"});
Time = new Date(Time);
var date = Time.getFullYear()+'-'+(Time.getMonth()+1)+'-'+Time.getDate();
var time = Time.getHours() + ":" + Time.getMinutes() + ":" + Time.getSeconds();
var timestamp = date+'-'+time;

DT.setField('timestamp', timestamp);

You can get a list of supported time zones here: https://www.w3schools.com/php/php_ref_timezones.asp

Remember you need to publish and access via direct link/embed ( because scripts will not fire in preview ).

Leave a Reply

Your email address will not be published. Required fields are marked *