Syntax error converting datetime from character string

  • select 'dateadd(dd,1,'+ getdate() + ')'

     

    I am getting a syntax error

    Syntax error converting datetime from character string

     

    How do i overcome this

  • What are you trying to achieve

    SELECT DATEADD(dd,1,GETDATE())

    or

    SELECT 'DATEADD(dd,1,'''+ CAST(GETDATE() as char(11)) + ''')'

    Far away is close at hand in the images of elsewhere.
    Anon.

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

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