This is a migrated thread and some comments may be shown as answers.

Date formatting differences

1 Answer 12 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 21 Apr 2020, 02:52 PM

Hi All

 

We have a range of reports hosted on a website and some of them use the US date formatting (mm/dd/yy) while others us the UK format (dd/mm/yy).

 

There's two reports that use the same date column in the database but one uses this US format while another uses the UK one. However when I run the reports in the report builder on my local machine both the reports use the UK format (which is what we want it to be).

 

The server that hosts the reports has its location set to UK and the format for the dates text box is the same in both reports too so I'm not sure what's causing some of these reports to format differently.

 

I'd have thought if it was an issue with the server then all reports would have the same date format instead of the mismatch that we currently have.

 

Is it possible there's other settings hidden away somewhere?

 

Cheers

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 24 Apr 2020, 08:38 AM

Hi Richard,

If I understood correctly, the date field is displayed in different formats when reports are previewed in the HTML5 Report Viewer.

When the report is displayed in a web application the dates will be displayed according to the OS region settings or the browser's language. In case, the report needs to use a different culture, then you can pass the culture information with code using the snippet at the bottom of Localizing Reports help article.

Another approach for passing culture information to reports is provided in How to pass culture via AJAX call from the HTML5 Report Viewer kb article.

I hope this information will help.

 

Regards,
Katia
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or