DATAPORT export Filename

bogdangeorgescubogdangeorgescu Member Posts: 9
Hi All,

recently i encountered a problem witch for many here will seem fun :)
i am exporting a file with a dataport on a scheduler and i need the name of the file to be the 'sysdate' unfortunately my programming skills are absent:) so i will have to use the filename function in the properties of the dataport.
can anyone help me on this? an example on how the file name should look like in order to be exported like this: C:\Users\bogdan.georgescu\'sysdate'.txt

Comments

  • kapamaroukapamarou Member Posts: 1,152
    You can try in your code to write:

    CurrDataport.FILENAME := 'c:\' + FORMAT(TODAY,0,'<Day,2>-<Month,2>-<Year>') + '.txt';

    The result will be c:\27-10-09.txt

    So in some setup table (maybe user setup) add a field for the folder path, and lookup the help for the format function or use DATE2DMY to get the date info and construct the exact filename you need..
  • bogdangeorgescubogdangeorgescu Member Posts: 9
    This really helped me, now it works fine, the exported file mane is now the sysdate
    Thanks allot for your help and your time!
  • kapamaroukapamarou Member Posts: 1,152
    Thanks allot for your help and your time!

    You're welcome. That's why we're here... :D
Sign In or Register to comment.