FNCDateTimePicker Set dateformat

The format is year-Month-Day in my WebCore app.

How can I set it to Day-Month-Year in code?

Regards,
Ole

Hi Ole,

There is no dedicated property to set the date format in TTMSFNCDateTimePicker. It works in combination with ShortDateFormat. If you create your component programmatically, then set the ShortDateFormat before the component is created. If you drop the component on the form, then of course it needs to pick up the ShortDateFormat that was set after the component was created, which can be done by assigning a selected date again.

There was a small issue with the components that are added at design-time, and we applied a fix for it. It should be part of the next update, and after that you could do:

procedure TForm1.WebFormCreate(Sender: TObject);
begin
  ShortDateFormat := 'dd-mm-yyyy';
  TMSFNCDateTimePicker1.SelectedDateTime := Now;
end;

Hi Tünde

Thanks for your answer, it solved the issue.

I had to use formatsettings.ShortDateFormat := 'dd-mm-yyyy'; :smiley:

Regards,
Ole