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:

ex:

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?

Thanks.

Answers


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"


Need Your Help

How to grab data from JSON array and put into a listview?

javascript jquery-mobile

Hi i am new to javascript programming, i am making a dropdown list view(picker view) in jquery mobile, for the data to be in that picker view i created a json array. the problem is that i need the ...

How can I load a KML in google map, without changing the map center

javascript html google-maps

How would I add the KML as a layer in google maps (javascript v3) without changing the map extent/zoom?