Debug stored procedure | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Debug stored procedure

Hi guys
I find out the Debugger of SQL Query Analyzer to debug the stored procedure, but I have a problem: how can I pass a datetime or smalldatetime to the parameter of stroed procedure ? I cannot find the correct format: I tried yyyymmdd, dd/mm/yyyy, #yyyymmdd#, etc, but nothing… Thanks
Bye Sorry for my English…

you can pass the smalldatetime by ‘mm/dd/yy 13:30:00’ or whatever the time you want
go with yyyy-mm-dd. you can never go wrong with it <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />
if in doubt of what format to use, run this
select getdate() Then pass the date (in single quotes) in that format. There can be issues with just numeric month/day values because different people think of them differently, for example 01/02/2004 could Jan 2, 2004 or Feb 1, 2004 depending on who was writing it. For importing, I almost always go with (and have never had a problem with) ddmmmyyyy so 01Jan2004 and there is no mistake between month/day that way (and its easy to read). The other one that is usually accepted without risking a dd/mm switch is mmm dd, yyyy or Jan 01, 2004 Chris
]]>