troubleshooting Question

Converting of date to integer

Avatar of PRINCE101
PRINCE101Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL ServerMicrosoft Applications
4 Comments2 Solutions547 ViewsLast Modified:

Am trying to populate a snapshot fact table, i decided to add a derived column to get the current date but then i need to write an expression to convert the date into integer value as my destination is integer. this is my expression (DT_WSTR,30)(DT_DBDATE)GETDATE() and i did the data conversation to four-bye signed which brought the error below.
any help on how to convert the current date to an integer so i can mapped the source and the destination correctly..
many thanks

[Get Today's Date [902]] Error: An error occurred while attempting to perform data conversion. The source type could not be converted to the destination type.
[Get Today's Date [902]] Error: SSIS Error Code

DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "Get Today's Date" (902)" failed because error code 0xC0049062 occurred, and the error row disposition on "output column "TodaysDate" (908)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros