Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Add timestamp to the file

Author  Topic 

lols
Posting Yak Master

174 Posts

Posted - 2007-09-24 : 07:34:28
Hi,

I am moving a file to another folder after processing. I want to append the month, year and time. I have been able to append yr and month using this

(DT_STR, 2, 1252) Month( @[System::StartTime] )+ (DT_STR, 4, 1252) Year( @[System::StartTime] )

How to append the time to this?

thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-09-24 : 08:18:27
Try

(DT_STR, 2, 1252) Month( @[System::StartTime] )+ (DT_STR, 4, 1252) Year( @[System::StartTime] )
+convert(varchar(20),@[System::StartTime] ,108)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

lols
Posting Yak Master

174 Posts

Posted - 2007-09-24 : 10:10:33
thanks.
Go to Top of Page

lols
Posting Yak Master

174 Posts

Posted - 2007-09-25 : 01:03:17
Hi,

i tried this. it says that function varchar is not recognised.

The correct answer is over http://blogs.conchango.com/jamiethomson/archive/2007/02/07/SSIS-Nugget_3A00_-Construct-a-timestamp-value.aspx

Go to Top of Page
   

- Advertisement -