Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
Je demande de l'aide sur une conversion de type de date qui est un peu nouveau pour moi.
J'ai le format suivant par exemple dans le fichier:
27. Jul 22,
25. May 22,
17. Aug 22,
et je le veux sous le format
"yyyy/MM/dd" ==>
2022/07/27 par exemple
Merci par avance de votre aide
In English
Hello,
I'm asking for help on a date type conversion which is a bit new to me.
I have the following format for example in the file:
27. Jul 22,
25. May 22,
17. Aug 22,
and I want it in the format "yyyy/MM/dd" ==> 2022/07/27 for example
Thank you in advance for your help
hi @THIERNO DIALLO ,the pattern for this date is "dd.MMM yy" so if your input field data type is date you can set the pattern i mentioned just before and in the output you can change the pattern to "yyyy/MM/dd"
thank you for your feedback but it does not work. there is a space between the . and the month example: 27. Jul 22
I keep trying things but it still doesn't work
"dd. MMM yy"
I have already tried this format """dd. MMM yy" but it still fails to parse the date
Hi
What's the error you are getting?
I made a simple testing with this expression and it works.
String s1 = "25. May 22";
java.util.Date date1=TalendDate.parseDate("dd. MMM yy", s1);
System.out.println(date1);
Regards
Shong
hello Shong,
your method works. finally in the file there were several types of dates. So I left the input format as is and put the yyyy/MM/dd format in output and it worked;
thank you very much for your feedback