SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Classes
About Us
Login / Register
Subscribe RSS Feed 

Confio Ignite

Adding a Time Stamp to a File Name in SSIS

This videos show you how to dynamically add a date stamp to a file name using SQL Server Integration Services expressions. It's a great example of how to set a property using an expression, with possible applications ranging far beyond just adding a date stamp.

Duration:
6 mins 9 secs
Skill Level:
200
Rating:
4.51 out of 5
Publish Date:
December 01, 2008
Adding a Time Stamp to a File Name in SSIS Watch Video Now  Watch it later!
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Brian Knight
Owner of Pragmatic Works :: Brian Knight, SQL Server MVP, MCSE, MCDBA, is the co-founder of Jumpstart TV and SQLServerCentral.com. Brian has written and co-written 9 technical books. Brian has spoken at conferences like PASS, TechEd and Connections. Brian develops solutions with Pragmatic Works to migrate DTS packages to SSIS.

References

There are no downloads or recommended reading links for this video

Comments
Jim Phillips on 12/4/2008
Just what I was looking for.

Dick Rosenberg on 12/14/2008
I have wanted to know how to do this in SSIS ever since I started learning SSIS. Thanks!

Satish on 12/29/2008
nice thank u

Srividya on 1/6/2009
it is a good video but must be still have explained the time graph in a detailed manner

Sridhar on 1/21/2009
DO you also have a video how to add timestamp to an .mdb file?

jag on 1/21/2009
h

vinaykotha on 1/28/2009
Its really a good video

vinaykotha on 1/28/2009
How to add a timestamp to a table

Marco Rios on 2/7/2009
qqqqqq

lesasapre on 2/9/2009
Good.Keep going..

praxy on 2/10/2009
thanks Brian Knight it was very helpfull to each ssis learner

Ed Svastits on 2/10/2009
Easy to understand. Great tip.

Marc Kuyper on 2/10/2009
concise and very instructive.

Rubens on 2/10/2009
I really appreciate the SSIS videos, especially because I am very inexperienced with it. Please keep them coming!

A1438BFC47 on 2/10/2009
I had to do this last week, but the format of the date string they wanted was very specific. Moreover I had a feeling they would change their minds. I created some variables and pass them into an SSIS script task, build the connection string, and assign it to a variable. That variable is used in an expression for the file connection string. Now they can adjust what values are passed to the variable in the SQL Agent job and I never have to touch the SSIS package when they change their minds...

Thomas Kelley on 2/10/2009
As always, thanks.

Larry on 2/10/2009
It's good that you show some of the issues that might arise with any particular solution.

Raalnan Five on 2/10/2009
First video I have watched on the site. There was no real lead in to tell me what I was watching, so I just jumped in at the first video.

Ibrahim Hafidh on 2/11/2009
Great video. I really like it when you make a mistake and then show how to correct it; as opposed to everything going smooth. I would like to see a tutorial on assigning a variable to the path. You kind of skimmed through that at the end.

Terence Tully on 2/12/2009
Awesome...as always, Brian has a knack for breaking down and explaining tasks that makes it easy and relevant to learn!

Richard on 2/13/2009
I like it! Not only the videos are awesome, but the questions after that make me think of what I've just watched and remember it easier!

Larry Blackford on 2/17/2009
Everyday real life example, excellent value.

vijay choudhri on 2/17/2009
Very good connectionstring.

Krish on 2/22/2009
Very good vedio with goood example

mahmoud on 2/26/2009
this video is very good, now ilearn how to use exprtion for connection string

This is great! A 6 minute video allows me to do what would have taken hours to correctly find on the net! Thanks jumpstartTV!!! I will post this link on twitter.

Wil Sisney on 3/16/2009
Fantastic demo. Keep it up!

Mike on 3/26/2009
good video. Appreciate your working through the errors, more 'real world' like.

Daron on 4/28/2009
Great video!, but would rather you use the variable approach to be more real-world.

Jeremy Pryor on 4/30/2009
Absolutely love the Zooming in/out, red arrows, red underlining, and the red circle beacon type flash in this presentation. Completely Awesome, it just adds to an already exceptional training session.

prashant on 5/7/2009
good one brother.

singaravelu on 5/14/2009
ss

Marten on 5/28/2009
Good video. Short and right on the spot!

SEKHAR ANIMILLA on 5/31/2009
excellent learning resourse

donald on 6/5/2009
video to small to see clearly.

Amy Darroh on 6/16/2009
THANK YOU! This, combined with assigning the file mod date/time to a variable, was exactly what I needed to do today! This was the clearest explanation I found.

Angelito Manalac on 6/17/2009
i love the this way of learning, it saves me a lot of time reading multiple materials, more power

Jerry Loyd on 6/23/2009
This solved one of the biggest problems I was facing in SSIS. It is amazing how misleading some of the dialogs are, such as for Connection Managers.

Dion on 6/30/2009
Just what i needed thanks

Super Khool on 7/8/2009
To the point and precise instructions. Good job.

Bruce Bealer on 7/9/2009
Question # 2 was worded poorly

James Moore on 7/22/2009
Cool stuff! Thanks, Brian!

Jim Berry on 8/6/2009
very good

R on 8/11/2009
Good one!

Sameer on 8/11/2009
Nice work Brian and beautifully presented.

Leigh Anne on 8/12/2009
Great video! I just wish you had zoomed in on the expression that included the timestamp with the replace function to remove colons. I really wanted to do a screen capture on that one.

Praveen on 8/31/2009
good .. was very helpful

Rajesh on 9/10/2009
Nice One!

srinivas on 9/29/2009
Excellent video

Rhys Domingo on 9/30/2009
Wasn't clear on how to use the connection string after you make the changes in this video.

Ben Cheeld on 10/1/2009
Little fuzzy on screen

Trudie Pearcy on 10/12/2009
This works great for flat file destinations, but I can't get it to worik at all on Excel file destinations.

sunil on 10/24/2009
wish i got the code

James Zhuo on 12/2/2009
Not enough context, otherwise good

Chad on 12/9/2009
I really enjoyed this video and spent quite a few days trying to find out exactly how to add a timestamp to a flat file. The only problem i'm having now is that my timestamp won't parse, I get a truncation error and i'm using the exact same code as in the video. Not matter what I try it just doesn't work.

rupesh sharma on 12/15/2009
very informative

Ashish on 12/28/2009
Great demo, thanks.

wilfredo on 1/5/2010
It would be good if we could read what you are doing. Only when you are zooming in we see it.

lotfi on 1/14/2010
thank you

sunil on 1/15/2010
voice with vedio streaming is breaking due to network or internet.

Jay Shetty on 1/20/2010
simple and effective

Matt Packer on 1/31/2010
Exactly what I was trying to solve, yet very concise. THANKS!!!!

ranu on 2/15/2010
thx..it was useful

mareeswaran on 2/17/2010
good

Velu on 2/22/2010
very nice to understand.txs a lot.

Stephen Anslow on 3/1/2010
I would love to see the final code as something I can copy-paste having watched the video... :-)

Andrei on 3/2/2010
great video guys

Eugene Ganzenko on 3/11/2010
When I use "C:\\TEST\\Archive\abc.txt"+ "_"+ (DT_WSTR, 40)(DT_DBDATE)GETDATE() it works fine. Now I want to add time like you do: "C:\\TEST\\Archive\abc.txt"+ "_"+ (DT_WSTR, 40) (DT_DBDATE) GETDATE() + (DT_WSTR, 40)(DT_DBTIME)GETDATE() and get error message “A truncation occurred during evaluation of the expression.” But it works in your video just fine! We are on SQL2008. What could be the problem? Thank you very much.

Simon on 3/15/2010
to the point, clear.

Brondor on 3/18/2010
bad sound

excellent!

bobby on 3/23/2010
Can you pls provision something so we can download and watch it full screen ? thanks, bobby

C Boos on 3/30/2010
The explanation was okay but built on a previous understanding of the DT functions and the expression concept both of which are new to me

Aniruddha on 3/31/2010
uiygjhlk

Cosmin Tornea on 4/12/2010
super

Narendra on 4/18/2010
excellent

Irene Floyd on 4/19/2010
Great video! You hard coded the file name and path, but mentioned that you could have used a variable. I tried that, but am getting an error message on the last FINDSTRING about "@" not being recognized. How do I get around that?

Ravi on 4/23/2010
some time video is not cleare. rest of all are good.

Great video, showed my just what i wanted step by step.

Jamie Portolese on 5/11/2010
Exactly what I was looking for. Love these videos

Ram on 6/9/2010
It ia very usefull

Muniabu on 6/10/2010
good

sarika on 6/15/2010
Video was great. I get following error when I try to rename file using this method, any idea why? TITLE: Package Validation Error ------------------------------ Package Validation Error ------------------------------ ADDITIONAL INFORMATION: Error at Restraints [Connection manager "DestinationConnectionExcel"]: The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager. Error at Restraints: The result of the expression ""\\fh1adcb\\clientdata\\DTSData\\Restraints" +(DT_WSTR, 30)(DT_DBDATE) GETDATE() + " "+REPLACE((DT_WSTR, 30)(DT_DBtime) GETDATE(), ":", "")+ ".xls"" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property. (Microsoft.DataTransformationServices.VsIntegration) ------------------------------ BUTTONS: OK ------------------------------

justme on 6/17/2010
great explaination!

alban on 6/22/2010
work as it says on the tin. Thanks.

Kaladhar on 6/30/2010
Excellent

sudipta on 7/29/2010
Awesome trick !

anilbabu on 8/3/2010
ok

Mike Nicholas on 8/18/2010
Pretty good! I've been having trouble doing some file system tasks using variables in order to manipulate some flat files, so I was hoping this tutorial would incorporate the variables based on expressions rather than just the expression alone.



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions