discuss how a database administrator can extract data from a database and convert date\time fields out of the data into a different format (DT_DBTIMESTAMP2 to DT_DBDATE).
Solution:
The Extraction:
If we employ OLE DB source then we can extract data which contain different methods of extracting data.
some of these methods are given below:
The table should be specified in the variable
Employment of parameterized query
Employing a variable to store the outcome of an SQL statement.
Below steps should be followed in order to access these methods:
In SSDT open the Integration Services project
Select data flow tab and double click OLE DB source
Create a new OLE DB connection manager and now any of the data access methods can be chosen.
DT_DBTIMESTAMP2 to DT_DBDATE(the conversion):
As soon as the data is extracted, the database administrator can store as a string and change it to proper datatime format by employing DT_DBTIMESTAMP2. In the script also Datetime.ParseExact function can be used.
Hit the thumbs up if you liked the answer. :)
Get Answers For Free
Most questions answered within 1 hours.