SimpleDateFormat Ignore Symbols

I use SimpleDateFormatand get results from two different sources. One source uses the format "yyyy-MM-dd HH:mm:ss", and the other uses "yyyy-MM-ddTHH:mm:ssZ". I'm not interested in getting the time zone ("Z" value) from the second format, is there a way I can get these times without using different format strings? Something that will ignore the middle character, as well as the characters after 'ss'.

+4
source share

Source: https://habr.com/ru/post/1614802/


All Articles