Skip to main content
Participant
March 28, 2025
Question

How to Merge fields to create a date

  • March 28, 2025
  • 2 replies
  • 185 views

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
March 28, 2025

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

try67
Community Expert
Community Expert
March 28, 2025

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