You can force a leading 0 to be present where needed on date time parts via JavaScript.
An example getting the current month and returning to a CallScripter Field/Variable called "monthNumber":
var currentDate = new Date();
var month = currentDate.getUTCMonth() + 1;
[monthNumber] = month;
This can be used for a complete date time formatted string to ensure format compliance:
var currentDate = new Date();
var year = currentDate.getFullYear();
var month = currentDate.getMonth() + 1;
if(month < 10) month = "0" + month;
var day = currentDate.getDate();
if(day < 10) day = "0" + day;
var hours = currentDate.getHours();
if(hours < 10) hours = "0" + hours;
var minutes = currentDate.getMinutes();
if(minutes < 10) minutes = "0" + minutes;
var seconds = currentDate.getSeconds();
if(seconds < 10) seconds = "0" + seconds;
[callDate] = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
Article ID: 672, Created: August 12, 2014 at 5:25 PM, Modified: May 12, 2016 at 1:06 PM