Last post Dec 08, 2014 09:42 AM by Rion Williams
Dec 08, 2014 05:41 AM|AdBu|LINK
I have a report with a Date/Time parameter.
When I choose a date in the preview window (ex: January 2nd), month and day are automatically switched (ex: February 1st). And it switch back if I click "View Report" again.
I do not have this issue when deploying it.
What is happening ? It looks like a huge bug.
Dec 08, 2014 09:42 AM|Rion Williams|LINK
There are a variety of issues that could be causing this, but it may likely boil down to your local globalization / localisation settings. Basically, when your values are passed into your code-behind in a specific format (such as "MM/dd/yyyy"), ASP.NET might
be expecting them to be in "dd/MM/yyyy" and so when it parses the DateTime value, it's going to be incorrect. You may have to apply some code to indicate exactly the format that you are expecting (in ASP.NET, this would mean using the DateTime.ParseExact()
What happens when you use a Date like January 13th ("01/13/2014")? Does it blow up?