Format date to MM/dd/yy

I am modifying a report in NAV 2009 report writer to be used in RTC. I am trying to format the date in the page header to look like 01/01/16 and it is not working for me. The field contains the following value: =code.GetData(8,3). I put MM/dd/yy in the Format property, but it is not working. It does work in reports that use =ReportItems!... Can someone help me with this? Thanks!

Best Answers

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,139
    Yes Vimo try doing it from NAV only so that from dataset only it has the formatted values instead of trying to achieve it in visual studio.
  • vaprogvaprog Member Posts: 1,116
    GetData gives you a string, not a date. If you wanted to use RDL's formatting, you'd need to convert the string to a date first. Unless you need an interactive report, go with what my predecessors recommended.
  • vimovimo Member Posts: 14
    Thank you all!!! It worked.

    I placed the formatting in the classic report in the SourcExpr property: FORMAT("Sales Header"."Shipment Date",0,'<Month,2>/<Day,2>/<Year,2>');

    Now when I run the RTC report, the date is formatted perfectly!
Sign In or Register to comment.