Skip to main content
Participant
Mar 28, 2025 3:00 PM UTC
Question

How to Merge fields to create a date

Hello, it is possible to have three diferent fields for month, day & year and create a full date from there in another field?

We have a lot of people that enter always day as a month and I'm trying to avoid mistake and reprocesses.

2 replies

Nesa Nurani
Community Expert
Community Expert
Mar 28, 2025 4:40 PM UTC

You could use something like this as custom calculation script of the field where you wish to show full date:

var month = this.getField("Month").valueAsString;
var day = this.getField("Day").valueAsString;
var year = this.getField("Year").valueAsString;

event.value = (month && day && year)? month+"/"+day+"/"+year : "";

This assumes field names are "Month", "Day", "Year" and they all need to be filled to show the full date otherwise the field is left blank.
You could add validations to each field so they only accept numbers, for example for month field allow only 1-12, for day 1-31...etc

Translate
try67
Community Expert
Community Expert
Mar 28, 2025 4:19 PM UTC

Sure, but what should the merged field show if only the month and day fields are filled in, for example?

Translate