x

SSIS Date Formats

There seems to be several different data types in SSIS that represent date and/or time. Is there a direct relationship between T-SQL date types and SSIS date types? Is any one of the SSIS date type preferred over the others?

more ▼

asked Oct 22, 2009 at 12:18 AM in Default

Tim Mitchell gravatar image

Tim Mitchell
23 2 2 3

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

MS has a fairly complete listing of SSIS data types and how they map to data types in SQL Server and other database systems (Oracle, DB2, and Jet).

Here are some of the SSIS date data types that map directly to SQL Server date data types

DT-DBDATE -> date
DT-DBTIME2 -> time(p)
DT-DBTIMESTAMP -> datetime, smalldatetime
DT-DBTIMESTAMP2 -> datetime2
DT-DBTIMESTAMPOFFSET -> datetimeoffset(p)

I don't know that a particular SSIS date data type would generally be preferred over the others. I would say to prefer the SSIS data type that best represents the dates and/or times you are working with and that most closely matches the SQL Server data type you are trying to represent.

more ▼

answered Oct 22, 2009 at 01:00 AM

KenJ gravatar image

KenJ
19.3k 1 3 11

(comments are locked)
10|1200 characters needed characters left

Does SQLL2008 SSIS really support DT_DBTIME2? I can only find DT_DBTIME as a data flow type, DT_DBTIME2 only exists as a cast type in the derived column component, but can't be used outside of it, for example in a SQL Server Desitination.

more ▼

answered Mar 07, 2010 at 11:45 AM

Antek gravatar image

Antek
1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x928

asked: Oct 22, 2009 at 12:18 AM

Seen: 6749 times

Last Updated: Oct 22, 2009 at 12:18 AM