how to change the date format with code from delphi

Hi guys, I currently change the date format from the report

1.I select the field

2.-right click, I choose to edit

3.-format-> Category-> Date time

4.-format string "mm / dd / yyyy"


now I have the need of in the same report depending on the user wants to see the format string like "mm / dd / yyyy" or like this "dd / mm / yyyy", there is some way to tell fast report to take the regional configuration of the machine ??, or to be able to tell it to take a format with code ??, currently I work with delphi 10.3 and fast report vcl 6


thanks 

Comments

  • use

    var i: integer;

       c: TObject;

       m: TfrxMemoView;

    begin

     for i := 0 to frxReport1.AllObjects.Count - 1 do

       begin

         c := frxReport1.AllObjects.Items[i];

         if c is TfrxMemoView then

           begin

             m := TfrxMemoView(c);

             if m.DisplayFormat.Kind = fkDateTime then

             m.DisplayFormat.FormatStr := 'dd / mm / yyyy';

           end;

       end;

    end;

  • Thank you for your support, it works

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.