Start a conversation

Convert a date to CDISC format (dd/mmm/yyyy)

Study admins can define a custom date format for each institute in the Settings tab.

The calculation template below can be used to convert a date field entry into CDISC format (dd/mmm/yyyy). 

For example, if 30-01-2025 is entered into the date field, this calculation will convert the entry into the new format, as 30/JAN/2025. Replace your_date_variable with the variable name of the date field that should be converted.

var date = '{your_date_variable}';
var day = date.substr(0,2);
var month = date.substr(3,2);
var year = date.substr(6,4);
var months = ["JAN", "FEB", "MAR","APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
monthInteger = parseInt(month) - 1;
day + "/" + months[monthInteger] + "/" + year;
Choose files or drag and drop files
Was this article helpful?
  1. Castor Support Team

  2. Posted
  3. Updated