Hi everyone
I'm running an SSRS report using a dataprovider, but that also has a default query.
On that query, on one of the tables there is a date range that is open, so that when the user opens the report, they can specify a date.
In the data provider, I retrieve the value from the query so that I can display it on the report, reformatted etc.
The way I'm retrieving the parameter is like this:
str dateParm = query.dataSourceTable(tableNum(MyTable)).findRange(fieldNum(MyTable, dateField)).value();
When I print this value to the report though, it always appears in a M/d/yyyy format, but the default date format in the regional settings of the server and client are dd/m/yyyy.
Unfortunately, to retrieve the value from a QueryBuildRange object, you can only use value(), which returns a string. The same functionality is available using the QueryFilter object.
So, here are my questions:
1) Is that the only way to pull the date value our of a dateRange on a query object?
2) Is it possible to format that date while retrieving it?
3) What date format does it use by default? I'd expect it to use the local regional settings but it doesn't; it looks like a US format by default. What format does it use?
4) Is there a better/other way to pull the date value of the range out in the correct format?
Tx