locked
SSIS Data Conversion String (09/09/2009 12:32:32 PM) to Date (09/09/2009) RRS feed

  • Question

  • Hello All, 

    I am using SSIS to load csv  files into database. In my files I have columns Date which has format
    09/09/2009 12:32:32 PM. 

    I want to load this column in this format  09/09/2009 i.e, only in date format.
    Any thoughts on this will be appreciated. 

    Thanks :)
    Friday, September 9, 2016 9:46 PM

Answers

  • can you try the Derived Column Transfromation (to convert to Date values) with either one of following expression dbDate_Output (if you want as Date ) : (DT_DBDATE)SUBSTRING([Date],1,FINDSTRING([Date]," ",1)) Date_Output (if you want as Date&time --12AM formatted Time ) : (DT_DATE)SUBSTRING([Date],1,FINDSTRING([Date]," ",1))

    Date_Txt : (if you want as String- only for Date Part):

    SubString( [Date], 1, FindString( [Date], " ",1 ) )



    rajivkumar.bala@yahoo.co.in








    • Edited by msbi_Dev Friday, September 9, 2016 11:01 PM
    • Proposed as answer by Olaf HelperMVP Saturday, September 10, 2016 6:48 AM
    • Marked as answer by TWoW2017 Friday, September 16, 2016 3:31 AM
    Friday, September 9, 2016 10:39 PM