If it is valid for you to look at the problem in a different way : you are basically processing Strings here - you should be just be able to re-arrange your first string to get the second string using a PRPC Function (which you will write yourself in Java).*
Can you just clarify with concrete examples though: I'm a little confused about the meaning of 'mm' here (it looks like minutes in the first example, but then looks like months in the second ) ?
*It might NOT be valid to do this: since you *might* (for all I know) need to take into account timezones when you convert...this always adds complications and can lead to confusing results.
I am using email listioner to read messages and using pydate property to identify email received date to build some logic.
I can see the below date format in pydate property(OOTB) which i want to convert to yyyy-mm-dd to validate any cases created alredy with in the date range that is from email received date and case creation date.