Skip to content
Advertisement

Tag: simpledateformat

java format particular date with T character

What is the correct form for parse this date?: 2015-05-29T00:00:00+02:00 Answer Try with Notice that MM represents months, while mm represents minutes. if you want to have 24h format use HH, hh is for 12h format XXX represents time zone in format like -08:00 to add literal like T in format you need to surround it with single quotes ‘

Date formatting according to country habbits

We create J2SE application that has to format the date and time according to custom the country from which users come from. I want to ask how to solve this thing in Java? Probably I’ll use SimpleDateFormat, but I wonder if it is possible to get format string in somehow simpler way than to have all format strings for each

Advertisement