Author |
Topic |
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-16 : 19:55:05
|
hello all,i am creating a file (flat file destination) from sql server table (OLEDB source) i want to name the file as "Ok Output"16102008184500.csvtill the date part it is fine (with below string), @[User::ArchivePath]+ "Ok Output" + (DT_STR, 4, 1252) Day( @[System::StartTime] )+(DT_STR, 2, 1252) Month( @[System::StartTime] )+ (DT_STR, 4, 1252) Year( @[System::StartTime] )+ ".csv"can any one please let me know how to get the time value (any functions )Thanks in advanceasin |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-16 : 21:11:48
|
like this:Right("0" + (DT_STR,4,1252) DatePart("hour",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("minute",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("second",getdate()),2) + ".csv" |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-16 : 21:17:34
|
You can use like this:@[User::ArchivePath]+ "Ok Output" +(DT_STR,4,1252) DatePart("yyyy",getdate()) +Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) +Right("0" + (DT_STR,4,1252) DatePart("d",getdate()),2) + "-" +Right("0" + (DT_STR,4,1252) DatePart("hour",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("minute",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("second",getdate()),2) + ".csv" |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-16 : 22:35:36
|
thank you Sodeep,i will check it and let you knowreally i am grateful to youBest Regardsasini |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-17 : 08:44:33
|
Hello Sodeep,it is working as desired thankyou very muchRegardsasini |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-17 : 08:51:35
|
Welcome Buddy!! |
 |
|
|
|
|