I have a problem retrieving the delivery date from .txt-file sent with EDI.
My customers have to opportunity to set the line in a .txt-file:
'DTM+76:20160702:102
when they order something from the website to set delivery date for future deliveries.
I want to get the date (in this case 2016-07-02) and set it to the deliveryDate-variable (and then set it in the database).
I am thinking about using Scanner in java to see if the file contains the text "DTM:76" and then read the date-part of the line like Find a string (or a line) in a txt File Java . Is it possible/effective with EDI or is there a better way to do it?
The best solution for me would be something like this:
if (DTM+76:YYYYMMDD::102 exists)
{
//set the deliveryDate by getting only YYYYMMDD from DTM:76:20160702:102
deliveryDate= get..("20160702");
}
Info about EDI and delivery dates: http://www.gs1.org/sites/default/files/docs/eancom/ean02s4/part2/insdes/053.htm https://www.stylusstudio.com/edifact/D96A/ORDERS.htm
Any suggestions?