I am puzzled with how to convert ddmmyy string to dd-MMM-yy date in java code.Example--
041110 as a string will be 04-NOV-10 as date.
Any suggestion will be greatly appreciated.
Thanks.
Using SimpleDateFormat
Something like
DateFormat input = new SimpleDateFormat("ddMMyy");
DateFormat output = new SimpleDateFormat("dd-MMM-yy");
String result = output.format(input.parse(inputString));
Why not use SimpleDateFormat
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With