Skip to main content

Search

Search

Subtract 59 Months From Date

Comments

1 comment

  • Avatar
    Shotaro Ito

    When you have expiration date in "Text 1", create a text and get data source from Object value (Label object string) of Text 1.

    Apply  VB script from Transform (more options).

     

    'Place this in OnProcessData Event'
    'Input data is yyyy-MM format'
    'Return 59 month before'
    
    y = left(Value,4)
    m = mid(Value,6,2)
    expdate = DateSerial(y,m,1)
    mfgdate = DateAdd("m",-59, expdate)
    Value = Year(mfgdate) & "-" & Right("0" & Month(mfgdate), 2)
    
    0

Please sign in to leave a comment.