Get the month before the current month

Highlighted
One Star

Get the month before the current month

Hi there,
I have the following code which I'm trying to use to rename a file in the tFTPPut component: "NEW-NAME-01-"+TalendDate.addDate(TalendDate.getDate("MMM-YY"),"MMM-YY",-1,"MM")+".txt"
However, the file name I get returned is NEW-NAME-01-Nov-13.txt; very strange. 
I want it to be like NEW-NAME-01-Oct-14.txt.
Thanks,
Facoda
One Star

Re: Get the month before the current month

HI HI HI HI
It's 
"NEW-NAME-01-"+TalendDate.addDate(TalendDate.getDate("MMM-YY"),"MMM-yy",-1,"MM")+".txt"
not
"NEW-NAME-01-"+TalendDate.addDate(TalendDate.getDate("MMM-YY"),"MMM-YY",-1,"MM")+".txt"

I changed YY to yy

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.