Solved

SSIS Expression converted from SQL

Posted on 2013-06-28
2
616 Views
Last Modified: 2016-02-11
Hi I am very new to SSIS and I have a derived column that I want to use an expression to set the date,  I have the following SQL statement,  how do I convert to SSIS

(CAST(CONVERT(CHAR(8), getdate(), 112) AS DATEtime) ) -88
0
Comment
Question by:knamc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
PortletPaul earned 500 total points
ID: 39286231
dateadd(day,-88,dateadd(day, datediff(day,0, getdate() ), 0))

SSIS dateadd
http://msdn.microsoft.com/en-us/library/ms141719.aspx
SSIS datediff
http://msdn.microsoft.com/en-us/library/ms139927.aspx

try to avoid conversion to varchar if you can, it is slower than using date functions
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 39289148
(DT_WSTR,4)YEAR(GETDATE()) + RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2) +  RIGHT("0" + (DT_WSTR,2)DAY( GETDATE()), 2)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question