puzzled with how to convert ddmmyy string to dd-MMM-yy date

godin :

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.

Jigar Joshi :

Using SimpleDateFormat

Something like

DateFormat input = new SimpleDateFormat("ddMMyy");
DateFormat output = new SimpleDateFormat("dd-MMM-yy");
String result = output.format(input.parse(inputString));

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How To Convert String ' dd/mm/yy hh:MM:ss ' to Date in javascript?

Convert string to Date in R: month abbreviated "dd-mmm-YYYY"

SQL convert date dmmyyyy and ddmmyy to yyyy-mm-dd

Convert MMM-YY to date where date before 1968

Convert MMM YY to Date time in python

How to change/convert input date format from MM dd yy to yyyy-mm-dd on submit

Convert DD-MMM-YY to YYYY/MM/DD in Pandas

Converting string format dd - mmm - yy to date

Converting a mmm-yy date in string format to date format

How to convert date dd/mm/YY to mm-dd-YY format in PHP

How to parse "dd-MMM-yyyy" or "MMM-dd-yyyy" date string using single regular expression?

how to convert sql date formate unix time stamp to date format as dd mm yy format?

want to convert string mm/dd/yy to date yyyy/mm/dd format in Sybase

Convert a character in the form of DD-MMM-YY to DD/MM/YY in R

Convert MMM-YY string into Sortable Date Format

PHP convert date to DD-M-YY

Convert date string dd-mm-yy to moment.js valid date

"EEE, dd MMM yyyy hh:mm:ss zzz" string convert to Date

How to convert the given date to dd-mm-yy format in javascript?

Convert json string to date in dd-mm-yy format using javascript

Convert a string to date Format: DD-MMM-YYYY to date time in Python

How to convert a string to a date from dd mmm yyyy format in SQL Server

how to convert date to yy-mm-dd in scala

How to convert date format "dd/mm/yy" to "yy/mm/dd" for mysql database inserting?

How to convert Java String "EEE MMM dd HH:mm:ss zzz yyyy"date type to Java util.Date "yyyy-MM-dd"

Convert Timestamp string (dd MMM yyyy HH:mm:ss) to Date (DD/MM/YY) in Google Sheets

Match date in dd-MMM-yy format to yyyy-MM-dd in Hive

How can I get datetime today date from C# with format 'dd-MMM-yy'

Convert string of dd-MON-yy to date in Python