title: How do I format date value as yyyy-mm-dd using SSIS expression builder?
body: <p>hi I have taking flatfile source name dynamically I.e. filename like "source 2011-08-11"
  I'm creating expression builder for taking most recent file as per filename.
  I did like
  Created one variable which is having folder path : C\backup\</p>
  
  <p>now inside expression builder how can i add date ???
  i tried like </p>
  
  <pre><code>@[User::DirPath]+"source"+ (DT_STR,4,1252)YEAR( DATEADD( "dd", -1, getdate() ))
  +"-"+(DT_STR,4,1252)MONTH( DATEADD( "dd",-1, getdate() ))+"-"+(DT_STR,4,1252) 
  DAY(DATEADD( "dd", -1, getdate() )) +".CSV"
  </code></pre>
  
  <p>which is wrong please give me the expression which gives me output :
   "source 2011-08-11"</p>