Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • CDMS
  • Castor CDMS Calculations Manual
  • Formatting dates

Check if entered date is in US format (mm/dd/yyyy)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • CDMS
    Castor CDMS Manual Castor CDMS Calculations Manual Frequently Asked Questions Articles for Data Managers Castor CDMS Compliance Release Documents
  • eConsent
    Castor eConsent Manual Castor eConsent Compliance Release Documents
  • SMS
    Castor SMS Manual Castor SMS Compliance Release Documents
  • Castor Connect
    Castor Connect Compliance Release Documents Castor Connect Manual Castor Connect - Participant Quick Start Guide
  • Helpdesk
    News Other Resources Castor products knowledge resources
  • Status page
  • Completing a Study
+ More

In the United States, the date format begins with the month and ends with the year (mm/dd/yyyy).

 

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

 

If you want to use an alternative format, we recommend you to use a text field. In this text field, you can use the formats:

  • mm/dd/yyyy
  • mm-dd-yyyy
  • mm.dd.yyyy

To check the date, use the following template in a calculation field, which displays the entered date in text format. That means that if you enter 01/30/2025 in the text field, the calculation will show "30 January 2025". Replace the variable your_text_field with the variable name of your own text field.

 

var date = '{your_text_field}';
if(/^((0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2})*$/.test(date)) {
var current_datetime = new Date(date);
var months = ["January", "February", "March","April", "May", "June", "July", "August", "September", "October", "November", "December"];
var formatted_date = current_datetime.getDate() + " " + months[current_datetime.getMonth()] + " " + current_datetime.getFullYear();
formatted_date;
} else {
 "Please enter the date in the right format (mm-dd-yyyy)"
}

Text the calculation in the calculation helper.

us format validate date

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Convert a date to CDISC format (dd/mmm/yyyy) in EDC/CDMS
  • Convert date formats in EDC/CDMS
  • Validating partial dates NK/MM/YYYY in EDC/CDMS
ISO 27001
FDA - 21 CFR part 11
ICH GCP compliant
HIPAA compliant
CDISC
ISO 9001
gdpr compliant

Products & Industries

  • Electronic Data Capture (EDC)
  • ePRO
  • eConsent
  • Decentralized Clinical Trials (DCT)
  • Clinical Data Management
  • Medical Device & Diagnostics
  • Biotech & Pharma
  • CROs
  • Academic Research

Resources

  • Thought Leadership
  • Blog
  • Castor Academy
  • Knowledge Base

 

Company

  • About Us
  • Careers
  • News
  • Contact Support
  • Contact Us

Legal & Compliance

  • Terms of Use
  • Privacy & Cookie Statement
  • Responsible Disclosure Policy
  • Good Clinical Practice (GCP)
  • ISO Compliance Certificates
  • GDPR & HIPAA Compliance
  • Security Statement

© 2022, Castor. All Rights Reserved.

Follow us on social media


Knowledge Base Software powered by Helpjuice

Definition by Author

0
0
Expand