Date format in EDIFACT UNB Header

Anonymous
2024-04-03T03:39:02.1666667+00:00

I am creating an Outbound EDIFACT Orders using a Logic App. I have successfully created the EDIFACT File, however the The Date in the UNB Header is generated in an 8 Character format (YYYYMMDD). I need this date to be in a 6 character format YYMMDD as defined in the standards. https://www.gs1.org/sites/default/files/docs/eancom/ean02s3/part2/orders/052.htm

I am unable to see anywhere that allows me to specify the format of the Date field. What's the best way to Correct the date on the message Header in an edifact file?

UNA:+.?*'
UNB+UNOA:3+SENDER:ZZ+RECIEVER:ZZ+20240403:0258+70'
UNH+82+ORDERS:D:01B:UN:EAN007'
BGM+220+PO-1010-000611+9'
DTM+137:202401231200:203'
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wilko van de Velde 2,236 Reputation points
    2024-04-03T06:19:53.09+00:00

    Hi @Anonymous ,

    There are several ways to format the date in Logic apps.
    It can be done by using functions like formatDateTime or convertTimeZone.

    But on stackoverflow (https://stackoverflow.com/questions/46463997/how-to-set-date-time-format-in-logic-app) I found a workaround with the convert time zone task:

    TwIYW

    Kind Regards,

    Wilko


    Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.