SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 rename file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nord
Posting Yak Master

126 Posts

Posted - 12/02/2013 :  15:43:59  Show Profile  Reply with Quote
Hi,
I have ssis transfer files from one dirrectory to another.
I would like to vadd to name file date format yyyymmddhhmmss,how I can do it use ssis
Thanks

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 12/03/2013 :  00:27:59  Show Profile  Reply with Quote
You can use File System Task for this.
Add a variable to generate the filename. Make EvaluateAsExpression property true for it. Keep expression as


REPLACE(REPLACE(REPLACE(SUBSTRING((DT_WSTR,30) (DT_DBTIMESTAMP) GETDATE(),1,19),":","")," ",""),"-","")


then in file system task for rename file choose destination connection as from variable and map it to variable created above.



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

nord
Posting Yak Master

126 Posts

Posted - 12/03/2013 :  11:44:29  Show Profile  Reply with Quote
Thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 12/04/2013 :  00:22:20  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000