truncation of datetime works fine in tsql but does not work when data loaded to txt file

  • I am trying to pull date format yyyy-mm-dd hh.mm.ss from '2016-07-05 02:38:52.1900000 -04:00'

    my sql:

    CONVERT(VARCHAR(19),datecolumn,120)

    this returns :2016-07-05 02:38:52.

    But when i load this column to my text file in ssis package from oledb to flatfile. it loads like this:

    2016-07-05 02:38:52.0000000 +00:00.

    Any reason why it behaves like this, can anyone tell me how to fix it?

  • You've been here long enough to know not to cross-post, so please don't. Answers here, please.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I wanted to delete this post in this section but could not. So, cross posted in correct section.

  • komal145 (7/25/2016)


    I wanted to delete this post in this section but could not. So, cross posted in correct section.

    You're right: you cannot delete your posts. Editing them, however, is trivial and involves clicking on the button marked 'Edit' and modifying the text you wrote.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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