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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Datetime parameters

Status
Not open for further replies.

PTW

Programmer
Jul 7, 2000
82
CA
I'm running a SCR 7 report from a MS SQL Server 7 Stored Procedure. The only parameters are a set of date ranges. The problem is that if the user wants the records from between (and including) a certain set of dates, they either must enter a date 1 day earlier than the stat date or else change the time portion of the start date to 12:00:00AM. This is very easy to forget to do since these reports are run fairly infreqently.

Is there any way I can make the parameters accept only a Date and ignore the time portion? Are there any other workarounds? Thanks!
 
You can enter a date in a string parameter instead, and convert that string to a date in the sp. The time will default to the beginning of the day when you convert in SQL Server.
There are other problems with date paramters in SCR and SQL Server, so I find string parameters are the most reliable. Malcolm
wynden@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top