SQL 2000 QA stored proc debugger and date formats

  • I'm using the SP debuger in SQL 2k Query Analyzer. The main problem I have is I can't determine what date format it expects. (I've tried mm-dd-yy, mm/dd/yy, yy/mm/dd and it reports these formats are invalid.) What format does it want?

    Bill

    P.S. QA debugger is peculiar. If I recall correctly, it expects strings to be entered without single quotes, not sql-like at all.

     

     

     

     

     

     

  • SET DATEFORMAT mdy

    GO

    DECLARE @datevar datetime

    SET @datevar = '12/31/98'

    SELECT @datevar

    GO

    set the format and proceed.

    Thanks,

    Ganesh

  • When using the debugger, the date parameter should be yyyy-mm-dd .  Don't include the quote marks.  Think of it as similar to filling out a form, you don't use quotes.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply