Supported Date of Birth Formats

Last updated: October 22, 2025

Overview

The patient_details.dob field in the Junction API accepts date strings in multiple formats and uses intelligent parsing to convert them to the appropriate date value. This document describes the supported formats, important considerations, and best practices for API consumers.

Supported Input Formats

Primary Formats

Our system accepts date strings in the following formats:

Format

Example

Description

YYYY-MM-DD

"2005-05-08"

Year-month-day, recommended format

MM/DD/YYYY

"05/08/2005"

Month/day/year, common in the US

MM-DD-YYYY

"05-08-2005"

Month-day-year, with dashes

DD-MM-YYYY

"08-05-2005"

Day-month-year, with dashes

YYYY/MM/DD

"2005/05/08"

Year/month/day, with slashes

Additional Supported Formats

The system also accepts:

  • Unix timestamps (integer)

  • Datetime objects

  • Other common date string formats

Validation Rules

The system enforces the following validation rules:

  1. Date of birth cannot be in the future.

  2. Date of birth cannot be before January 1, 1900.

  3. DOB must be included when submitting an order.

Best Practices

Use the "YYYY-MM-DD" format for all API calls to avoid confusion.

Tips for Success

  • Make sure dates are consistent and valid.

  • Use the same date format throughout your application.

  • Validate dates on your end before sending them to the API.

Common Pitfalls

If your system collects dates in MM/DD/YYYY format but sends them in a different format, the date might be interpreted incorrectly. Always use the recommended format to avoid this issue.

Search vs. Creation Behavior

Note: date handling may differ when searching for orders versus creating them. Always use the recommended format to avoid confusion.

Error Handling

You’ll receive an error if the date is invalid, missing, or outside the supported range (1900 to present).

Testing Your Implementation

Use these example DOBs to verify your date formatting:

1990-12-25
12/25/1990
25/12/1990
12-25-1990
02/03/1990
1990-02-03

Always validate that your interpreted date matches the user's intended date before sending it to the API.

Summary

  • Use the YYYY-MM-DD format for all dates.

  • Validate dates to ensure accuracy before submission.

  • Avoid ambiguous date formats by using consistent formatting.

  • Dates in the future or before 1900 are not allowed.