Timestamp expression

This SSIS expression (e.g. for use in a variable or derived column) returns a YYYYMMDDHHMMSS style 14-character timestamp from a datetime.

This example uses the current date and time; for other datetimes replace getdate() with the variable/column/expression containing your required value.

(DT_STR,4,1252)DATEPART( "yyyy" , getdate() ) 
  + RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , getdate() ), 2) 
  + RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , getdate() ), 2)
  + RIGHT("0" + (DT_STR,4,1252)DATEPART( "Hh" , getdate() ), 2) 
  + RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , getdate() ), 2) 
  + RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , getdate() ), 2)

This solution is taken from https://stackoverflow.com/questions/33442516/convert-getdate-to-yyyymmddhhmmss-as-derived-column.