Expression Connect string - string manipulation

  • How would you remove the dashes on the date section of this connection string? I've tried replace but without luck.

    Expression

    "D:\\DataMart_Reports\\Today\\" + @[User::AppName] + (DT_WSTR, (30)) (DT_DBDATE) GETDATE() + ".CSV"

    Evaluated Value returns

    D:\DataMart_Reports\Today\2009-02-06.CSV


    John Zacharkan

  • See this article for your answer

    http://wiki.sqlis.com/default.aspx/SQLISWiki/ExpressionDateFunctions.html

    --Ramesh


  • Thanks Ramesh -

    I worked it out must have had a typo earlier in my replace. For those of you who are interested here's my code

    REPLACE ("D:\\DataMart_Reports\\Today\\" + @[User::AppName] + (DT_WSTR, (30)) (DT_DBDATE) DATEADD("DD", -1 ,GETDATE() )+ ".CSV" , "-","")


    John Zacharkan

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

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