SSIS: t-sql command getdate() loads current date but not time portion
I have a t-sql command set up in an ole db source object:
select getdate() as LoadDate, customerid from dbo.customer
in the preview window of SSIS it shows the current date and time as I want it.
However, after I run the task and look at the destination table, the table shows the current date but the time portion is 00:00:00:000. I am wanting to see the time portion in addition to the date.
Any ideas what I am doing wrong?
I had a similar situation once where the problem was on my source, not on the destination.
I suggest you to check the field on the SourceComponent by right clicking it, selecting Show Advanced editor -> input and Output properties -> Expand "Output columns" -> Select your column and change to the proper data type (usually [DT_DBTIMESTAMP] works fine for me). Also for the sake of testing, do the same on "Output columns"