Reference·DTP Segment·DTP02
X12 837P Reference

DTP02 in X12 837P: A Field Guide to Date Time Period Format Qualifier

Jul 28, 2026 · 4 min read
← DTP01 DTP03 →

DTP02 is a two-character code most people skim right past, but it's the difference between a parser expecting eight digits and one expecting seventeen with a dash in the middle. Get it wrong in test data and DTP03 parses cleanly for the wrong reason.

Quick answer

DTP02 is the Date Time Period Format Qualifier in an X12 837P claim — it tells the receiving system whether the value in DTP03 is a single calendar date or a date range, and therefore what format to expect that value in.

Format values and what they mean

D8
Date, single value — DTP03 holds one date in CCYYMMDD format
RD8
Date range — DTP03 holds two dates in CCYYMMDD format separated by a hyphen

Example

Synthetic example Generated by Synthibase
DTP*096*D8*20260615

DTP02 value D8 tells the parser to expect a single eight-digit date in DTP03 — here, a discharge date of 2026-06-15. Synthetic claim data.

Where this trips people up

Some hand-built test fixtures set DTP02 to D8 out of habit and then paste a date range into DTP03 anyway, because the string looks superficially fine to a human reading the file. A parser that trusts DTP02 and slices the first eight characters off DTP03 will silently drop the second half of the range instead of raising an error, and the resulting claim looks complete right up until someone asks why the statement period only has a start date.

X12 837P DTP Segment Guide: Fields, Format, and Testing Gotchas
What is X12 837P? Complete Format and Field Guide
How to Write EDI Test Cases That Actually Catch Go-Live Failures
Test both date formats, not just the simple one
Synthibase generates synthetic 837P claims with correctly paired DTP02/DTP03 combinations across both single dates and date ranges, so format-mismatch bugs surface in testing instead of production.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.