Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Integration Services / July 2008

Tip: Looking for answers? Try searching our database.

construct date from parts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John A Grandy - 29 Jul 2008 22:26 GMT
Within a Devied Column Transformation Editor, how to build a date from parts
?

I have 3 cols 'year' , 'month' , 'day' , all numeric , I need to construct
the corresponding date.

Of the Date/Time Functions provided , DATEADD looks most promising, but
still won't work ( as far as I can tell ).
matteus - 30 Jul 2008 10:14 GMT
On 29 Lug, 23:26, "John A Grandy" <johnagrandy-at-gmail-dot-com>
wrote:
> Within a Devied Column Transformation Editor, how to build a date from parts
> ?
[quoted text clipped - 4 lines]
> Of the Date/Time Functions provided , DATEADD looks most promising, but
> still won't work ( as far as I can tell ).

Hi john,
this is ssis function syntax: DATEADD(datepart, number, date)
Returns a new Date type value from an existing date type value,
[date], augmented of [number] units of (alternatively) days/months/
years.
That can't fit your needs. I would rather try concatenating day + / +
month + / + year and performing a datetime conversion on it.
Something like:
(DT_DATE)[your string format like like yyy-mm-dd]

Here more infos:
http://technet.microsoft.com/en-us/library/ms141704.aspx

HTH,
M.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.