Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
is it possible to extracte only the file name and not the directory?
Currentyl I tried ((String)globalMap.get("tFileOutputDelimited_1_FILE_NAME")), which gives the whole path and not only the desired file name.
And is it possible to get the current date formatted like this "24-Oct-2019"?
Currently I am using TalendDate.getDate("yyyyMMdd"), which obviously creates "20191024"
Thank you very much!
Regards
Fred
Ok, I mxed up getDate and getCurrentDate.
Now it works:
TalendDate.formatDateLocale("dd-MMM-yyyy",TalendDate.getCurrentDate(),"EN")
Thanks!
@fred123 ,to get the only file name you need to do in tjava with ((String)globalMap.get("tFileOutputDelimited_1_FILE_NAME")) of sub-string function.
TalendDate.getDate("dd-Mon-yyyy") can you try this.
Hey thanks for the reply,
"Mon" doesn't work but TalendDate.getDate("dd-MMM-yyyy") generated nearly what I'm look for:
"24-Okt-2019"
Now I need the english value for month --> "Oct"
I tried TalendDate.formatDateLocale("MMM",TalendDate.getDate("dd-MMM-yyyy"),"EN")
The method formatDateLocale(String, Date, String) in the type TalendDate is not applicable for the arguments (String, String, String)
What am I missing? Why is TalendDate.getDate("dd-MMM-yyyy") a String argument?
Thanks!
Ok, I mxed up getDate and getCurrentDate.
Now it works:
TalendDate.formatDateLocale("dd-MMM-yyyy",TalendDate.getCurrentDate(),"EN")
Thanks!