Expression using replace and datepart

  • I have a xls file that is feeding in a value as "6/22/2010" into a sql table. The sql table defines this as datetime.

    I am trying through a derived column to replace the "22" with "15"

    I have this code in the expression:

    REPLACE([Transaction Date], DATEPART("dd",[Transactin Date]), "15")

  • Fixed it as following:

    (DT_WSTR,2)DATEPART("MM",[Transactin Date]) + "/15/" + (DT_WSTR,4)DATEPART("YYYY",[Transactin Date])

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

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