Friday, 28 December 2012

Date/time in EDI message

An UN/EDIFACT message contains several references to date/time but, first of all, you will find date/time into the UNB segment as S004.0017  / S004.0019:

    UNB+UNOA:2+SENDER-ID+RECEIVER-ID+090730:1323+1'

This data/time identifies when the full interchange was generated and it's a good practice to use the UTC format. 

UTC date/time allows to determine exactly when the interchange was generated without converting local date/time of the sender into local date/time of the receiver. 

For instance: 

    UNB+UNOA:2+SENDER-ID+RECEIVER-ID+090730:1323+1'
    UNH+2+COPARN:D:00B:UN:SMDG20'
    BGM+126+3+9'
    DTM+137:200907301523:203'
    RFF+BN:SAL/01'
    (...)

This interchange was generated on the 2009/07/30 at 13:23 hrs UTC but the local date/time of issue of the first document is 2009/07/30 at 15:23 hrs. It's reasonable to assume that the sender of the message lives in a GMT+2 time zone.