Conversion of Integer to text

GAURAVGAURAV Member Posts: 5
edited 2008-01-04 in Navision Attain
in a dataport i m using Filename property and the name of my file is date specific. So i m using DATE2DMY function which returns an integer value. Now I want to use this integer value and assign to FILENAME property in the C/AL code.
So please help me in converting the integer value returned from this function to text.

I m a fresher to navision.

Gaurav

Answers

  • krikikriki Member, Moderator Posts: 9,115
    The FORMAT-functions serves to convert any datatype to text. You probably need something like this:
    txtFileName := 'Some Name' + FORMAT(DATE2DMY(TODAY,3)) + FORMAT(DATE2DMY(TODAY,2)) + FORMAT(DATE2DMY(TODAY,1));
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • kinekine Member Posts: 12,562
    I am using this to generate file name including year, month etc...
    FileName := Path+FORMAT(CURRENTDATETIME,0,'<Year,2><Month,2><day,2><hour,2><minute,2>');
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.