Format Property in Dataport fields

I am trying to import a file where dates are represented as YYYYMMDD. I used dataport fields property “Format” and set it to , but it did not work. I ended up importing it as text, parsing and DMY2DATE-ing it. My previous attempts (including this one) of using the format property were unsuccessful. Has anyone been successful? Alex

I doubt whether the Format property of a Dataport is used at all when importing data. Kind regards, Jan Hoek Weha Automatisering BV Woerden - The Netherlands

No, I have atleast never used the format property in dataports for import to anything, But you don’t have to go as far as import it to a text variable, you can still import directly to a Date variable or field, just take care of the formatting or dataconversion in the OnBeforeEvaluateField trigger of the field. All values that are incomming to your dataport fields are first passed through this trigger as Text. So it is a perfect place to reformat or interpret the values. Best regards/Med vänlig hälsning/Kveðja/Med venlig hilsen/Mit freundlichen Grüssen Johan Emilsson

To bring in a date in mmddyyyy format, use the evaluate command… Evaluate(“Posting Date”, datestring); I use this all the time in dataports and it works fine. I also use the Format command in dataports. This seems to ensure that, especially with text fields, that all leading and trailing blanks are truncated. Regards, Mark. Mark Keener Automated Number Crunching Dayton, OH USA