Return A Date Format

ricky76ricky76 Member Posts: 204
edited 2006-11-07 in Navision Attain
I have a date of 30042006. I want to return this as Apr 30,2006. Any ideas how i can do this?

Comments

  • garakgarak Member Posts: 3,263
    For the name of the month, you can use the date table
    Do you make it right, it works too!
  • ara3nara3n Member Posts: 9,256
    Mydate := 04302006D;
    mystr := format(Mydate,0,'<Month Text> <Day>, <Year4>');
    message(mystr);
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • zeninolegzeninoleg Member Posts: 236
    OldDate := '30042006';
    EVALUATE(DayVar, COPYSTR(OldDate, 1,2));
    EVALUATE(MonthVar, COPYSTR(OldDate, 3,2));
    EVALUATE(YearVar, COPYSTR(OldDate, 5,4));
    
    MESSAGE('%1', FORMAT(DMY2DATE( DayVar,MonthVar,YearVar), 0, '<Month Text, 3> <Day>, <Year4>'));
    
    This should work
    Best Regards,
    Oleg
  • ricky76ricky76 Member Posts: 204
    Cheers for your help
  • ara3nara3n Member Posts: 9,256
    you are welcome. You should take a look at developer manual.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.