Default Format for Date Fields

Stimulsoft Reports.WEB discussion
Post Reply
Abed Hamodi
Posts: 19
Joined: Wed May 18, 2016 9:55 am

Default Format for Date Fields

Post by Abed Hamodi »

Hi ,

Currently in our reports, when adding a date field (in a business object), we have to manually enter the date format next to the field in the Stimulsoft report. This looks like :

{Format("{0:dd MMM yyyy}", IATAStatisticsDataProvider.DepartureDate)}

We do this so when we export the report, the data in the field is recognized as a date field.

Please let me know if there is anyway to have stimulsoft recognize date fields as dates by default without having to add the formatting manually. So in the above example we would only need to have {IATAStatisticsDataProvider.DepartureDate} for it to recognize as a date when exporting.

Thank you in advance.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Default Format for Date Fields

Post by Lech Kulikowski »

Hello,

Please try to set the Format property of the Text component.

Also, please clarify which type of the DepartureDate column?

Thank you.
Abed Hamodi
Posts: 19
Joined: Wed May 18, 2016 9:55 am

Re: Default Format for Date Fields

Post by Abed Hamodi »

Hi Lech,

Thank you for the response. I am aware of the text format option but I was hoping you could help me without using the stimulsoft designer options, if you can please assist in the c# and .NET aspect when exporting the report. I want it so if I create a date field in a business object (like the above mentioned DepartureDate example) it will have a default date format without having to manually set the formatting in the designer.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Default Format for Date Fields

Post by Lech Kulikowski »

Hello,

Unfortunately, there are no options for this. You should set the Format property.

Thank you.
Abed Hamodi
Posts: 19
Joined: Wed May 18, 2016 9:55 am

Re: Default Format for Date Fields

Post by Abed Hamodi »

Hi Lech
OK ,Thank you for the response
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Default Format for Date Fields

Post by Lech Kulikowski »

Hello

Please let us know if you need any additional help.

Thank you.
jserret
Posts: 23
Joined: Mon May 09, 2016 10:51 am

Re: Default Format for Date Fields

Post by jserret »

Lech Kulikowski wrote: Mon Jul 15, 2019 8:43 pm Hello

Please let us know if you need any additional help.

Thank you.
I have this problem, i need the date format dd-mm-yy in the cell when i export the report to excel, but y don't found this format in stimulsoft.
Attachments
DateFormatStimulsoft.png
DateFormatStimulsoft.png (22.61 KiB) Viewed 2860 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Default Format for Date Fields

Post by Lech Kulikowski »

Hello,

Please try to set the Custom format.

Thank you.
Post Reply