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.
Author |
Topic |
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2011-06-21 : 18:50:10
|
hi experts,The derived file name below is OK except that I want the time to not have the : char. So I want 20110621_174600.csv \\pncllwapp\E$\RAMCO\OUT\FINTG\LAWSON\PMI\INV_20110621_17:46:00.csvI used Convert(varchar(8), @curDate, 108) but that is giving me the : charsAny ideas? Thanks, John |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2011-06-22 : 09:51:12
|
Thanks, Tara. That worked sweetly.Here is the final code:Set @ReportPath = '\\pncllwapp\E$\RAMCO\OUT\FINTG\LAWSON\PMI\' + 'INV' + '_' + Convert(varchar(8), @curDate, 112) + '_' + Convert(varchar(8), @curDate, 108) + '.csv'-- Remove : chars from timestampselect replace( replace( @ReportPath, ':', ''), ',', '')print @ReportPath shows:\\pncllwapp\E$\RAMCO\OUT\FINTG\LAWSON\PMI\INV_20110622_084900.csv |
 |
|
|
|
|
|
|