Date format not working

Stimulsoft Ultimate discussion
dikan
Posts: 199
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Date format not working

Post by dikan »

I have strange issue with dates. In designer , report preview look ok. But in Blazor server application sometimes date format is not working.

Example where it works:

https://prnt.sc/uRUOFImh-_o5

Example where it doesn't work regardless if i use {BRRDR.DATPOC.ToString("dd.MM.yyyy")} or {Format("{0:dd.MM.yyyy}", BRRDR.DATPOC)} :

https://prnt.sc/xpGDhhwJ7eyC

I hope you can help me.
Thank you.
Lech Kulikowski
Posts: 7193
Joined: Tue Mar 20, 2018 5:34 am

Re: Date format not working

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
dikan
Posts: 199
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: Date format not working

Post by dikan »

Hello,
since it is complicated report with a lot of database tables and subreports, we will need some time to prepare test data and sample report.
Thank you,
Lech Kulikowski
Posts: 7193
Joined: Tue Mar 20, 2018 5:34 am

Re: Date format not working

Post by Lech Kulikowski »

Hello,

Ok. We will wait.

Thank you.
dikan
Posts: 199
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: Date format not working

Post by dikan »

Hello,
why is this not working any more:
Attachments
Date issue.png
Date issue.png (63.61 KiB) Viewed 49881 times
Lech Kulikowski
Posts: 7193
Joined: Tue Mar 20, 2018 5:34 am

Re: Date format not working

Post by Lech Kulikowski »

Hello,

The Format function is return a string, but your variable is datetime.

Thank you.
dikan
Posts: 199
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: Date format not working

Post by dikan »

My problem is that when I run the report on the IIS server my Blazor Application shows the wrong date format. I need dd.MM.yyyy but in this particular case I have MM/dd/yyyy what is not acceptable for my clients.
How can I customize the format for date no matter how it is defined on the local operating system?
Lech Kulikowski
Posts: 7193
Joined: Tue Mar 20, 2018 5:34 am

Re: Date format not working

Post by Lech Kulikowski »

Hello,

You can set the necessary culture property of the report. Or you Text Format option to set the necessary DateTime format.

Thank you.
dikan
Posts: 199
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: Date format not working

Post by dikan »

I am sorry, but culture property did not work.

Variable defined like this, still gives this as result: 03/24/2025 instead of 24.03.2025
Attachments
Date.png
Date.png (20.58 KiB) Viewed 39119 times
VARIABLE.png
VARIABLE.png (24.67 KiB) Viewed 39119 times
Lech Kulikowski
Posts: 7193
Joined: Tue Mar 20, 2018 5:34 am

Re: Date format not working

Post by Lech Kulikowski »

Hello,

Try to use the ParametersPanelDateFormat option:
https://www.stimulsoft.com/en/documenta ... ttings.htm

Thank you.
Post Reply