Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Date Parameters in MS reporting services

Status
Not open for further replies.

DiggerDog

Programmer
Nov 24, 2002
60
AU
I've created a report which has a start end date passed to the SQL script - When I run the repot and I select something like 2 Jul 2006 it gets formatted to mm/dd/yy even so 07/02/2006 gets passed to the SQL which thinks I'm entering a date of 07 Feb 2006 instead of 02 Jul 2006 - Is ther anywhere I can adjust the parameter controls to ensure the correct date is passed to the code
 
try something like:
Code:
SELECT field1, field2
  FROM table1
 WHERE field3 BETWEEN CONVERT(varchar,begin_date,101) AND CONVERT(varchar,end_date,101)
 
I've tried that but the problem is calander control inverts the date before it passes it to the SQL code so converting it to a varchar doessn't make any difference - I've found another link which explains the problem more clearly.


I've found that in design mode the problem exists but when I deploy the report it goes away - strange
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top