Purpose
The DTM (Date/Time/Period) segment is one of the most frequently used segments in EDIFACT. It conveys date, time, and period information associated with a business transaction. A single message typically contains multiple DTM segments, each qualified to indicate what the date represents: the document issue date, a requested delivery date, a payment due date, a shipment date, and so on.
The DTM segment can appear at the header level (applying to the entire message), at the detail level (applying to a specific line item), or within segment groups alongside other segments to provide contextual timing information.
Data Elements
The DTM segment contains one composite data element with three components:
- C507 - Date/Time/Period:
- 2005 - Date/Time/Period Qualifier: A coded value that specifies the meaning of the date. Common qualifiers include:
- 137 - Document/message date/time
- 2 - Delivery date/time, requested
- 35 - Delivery date/time, actual
- 13 - Terms net due date
- 171 - Reference date/time
- 63 - Delivery date/time, latest
- 64 - Delivery date/time, earliest
- 3 - Invoice date/time
- 2380 - Date/Time/Period Value: The actual date, time, or period value expressed in the format specified by the next component.
- 2379 - Date/Time/Period Format Qualifier: Specifies the format of the value. Common format codes include:
- 102 - CCYYMMDD (e.g., 20240315)
- 203 - CCYYMMDDHHMM (e.g., 202403151430)
- 718 - CCYYMMDD-CCYYMMDD (date range)
- 2005 - Date/Time/Period Qualifier: A coded value that specifies the meaning of the date. Common qualifiers include:
Format and Syntax
The general format of a DTM segment is:
DTM+qualifier:value:formatCode' All three components are part of a single composite element (C507), separated by colons. The segment ends with the segment terminator.
Messages That Use DTM
The DTM segment appears in nearly every EDIFACT message type, often multiple times within a single message:
- INVOIC - Invoice date, tax point date, payment due date
- ORDERS - Order date, requested delivery date, validity period
- DESADV - Shipment date, estimated arrival date
- RECADV - Receiving date
- IFTMIN - Pickup date, delivery date, collection date
- PRICAT - Price validity period
Example
A document date of 15 March 2024:
DTM+137:20240315:102' Qualifier 137 means "document/message date/time," the value 20240315 is the date, and format code 102 indicates CCYYMMDD format.
A requested delivery date with time:
DTM+2:202403201000:203' Qualifier 2 means "requested delivery date/time," the value 202403201000 is 20 March 2024 at 10:00, and format code 203 indicates CCYYMMDDHHMM.
A delivery period (date range):
DTM+2:20240320-20240325:718' This specifies a requested delivery window from 20 March to 25 March 2024 using format code 718 for date ranges.