hi im running a DTs package where i would like to create a excel filename on the fly(using Date) cuurently i just have a default filename and then rename it but it doesnt work ne one know why please
Function Main()
Dim FileDate
Dim DateString
Dim FSO
Dim File
FileDate = Date
DateString = DatePart("yyyy",FileDate) & Right("0" & _
DatePart("m",FileDate), 2) & Right("0" & DatePart("d",FileDate), 2)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set File = FSO.GetFile("G:\England Marketing\Achiever_Reporting\counts_report.xls")
DTSDestination("colname") = DTSSource("colname")
DTSDestination("Total") = DTSSource("Total")
File.Name = "counts_report_" & DateString & ".xls"
Main = DTSTaskExecResult_Success
Function Main()
Dim FileDate
Dim DateString
Dim FSO
Dim File
FileDate = Date
DateString = DatePart("yyyy",FileDate) & Right("0" & _
DatePart("m",FileDate), 2) & Right("0" & DatePart("d",FileDate), 2)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set File = FSO.GetFile("G:\England Marketing\Achiever_Reporting\counts_report.xls")
DTSDestination("colname") = DTSSource("colname")
DTSDestination("Total") = DTSSource("Total")
File.Name = "counts_report_" & DateString & ".xls"
Main = DTSTaskExecResult_Success