Copy link to clipboard
Copied
In the date1 field, I have a date in ddmmyyyy format. In the date2 field, I want to display a date from the date1 field in the d. m. yyyy format. How to do it?
You can use this code as the custom calculation script of "date2":
var s1 = this.getField("date1").valueAsString;
if (s1=="") event.value = "";
else {
var d1 = util.scand("ddmmyyyy", s1);
event.value = util.printd("d.m.yyyy", d1);
}
Copy link to clipboard
Copied
You can use this code as the custom calculation script of "date2":
var s1 = this.getField("date1").valueAsString;
if (s1=="") event.value = "";
else {
var d1 = util.scand("ddmmyyyy", s1);
event.value = util.printd("d.m.yyyy", d1);
}
Copy link to clipboard
Copied
Oh my goodness, brilliant. Thanks so much.
Copy link to clipboard
Copied
Super! It works perfectly!