Ignore characters in a file name string

  • Hello,

    I'm relatively new to SSIS (which will likely become painfully obvious soon). I'm trying to write an expression to use in an FTP task that captures a file name of the form:

    abc_xyz_YYYYMMDDHHMMSS

    The "abc_xyz" isn't dynamic, but what I want to do is have the FTP task only process the YYYYMMDD portion of the date/time. I'd like it to ignore the HHMMSS. Here's my expression so far:

    @[User::FTPString] + "/abc_xyz_"+(DT_WSTR, 4) DATEPART( "yy", GETDATE() )+ (DT_WSTR, 2)DATEPART("mm", GETDATE())+(DT_WSTR,2)DATEPART("dd",GETDATE())

    This gets me what I want, namely, [string path in variable]/abc_xyz_20100224, but leaves the time chunk dangling. Can I just put variables of who-cares-what-value at the end?

    Thanks!

    Ed Womack
    Get Milked

  • You might be able to add the wildcard * character at the end of what you have built.. Not sure about that control..

    CEWII

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply