How to convert timestamp in string format to datetime data type in package?

Can someone help me convert MM/DD/YYYY HH:MMthat comes from the source of a flat file as a string in datetime to destination ole db using a derived column.

This is my stream.

Flatfile -> Data Coversion -> Derived Column
+3
source share
1 answer

There are several ways to achieve this. You can use Derived Column transformationvalues ​​to convert or , you can declare a column of a flat file in conjunction with a flat file as a data type column . Steps 1 - 8 describes a first embodiment and Step 9 describes the second embodiment. database timestamp [DT_DBTIMESTAMP]

Step by step:

  • Source.txt, # 1.

  • Flat File Connection , # 2 # 3.

  • Data Flow Task , 4.

  • , # 5.

  • Derived Transformation , 6, cast DT_DBTIMESTAMP, .

  • OLE DB Destination , 7.

  • # 8 .

  • # 9 SQL .

  • , , , database timestamp [DT_DBTIMESTAMP], # 10. Derived Column transformation, Data Flow Task # 11. Flat File OLE DB Destination.

, .

№1:

1

№2:

2

№3: ​​

3

№4:

4

№ 5:

5

№ 6:

6

№ 7:

7

# 8:

8

№ 9:

9

№ 10:

10

№ 11:

eleven

+7

All Articles