Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Help with today's date - 2 days as a string for a file name

$
0
0

This will be an Expression/Connection String for a Flat File Connection Manager.

Need it in this format COMPANY20150402.txt except the formula needs to incorporate the DATEADD("D", -2, Getdate())

"COMPANY" + (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)  +".txt"

Where do I add the DATEADD part? and be syntactically correct?

TIA

Harry


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>