A program written in Java + Swing falls out under a poppy, where it tries to use SimpleDateFormat. Is there an analogue of it? Or just use DateFormat?

Here is the code:

SimpleDateFormat df = new SimpleDateFormat("HH:mm | dd.MM.YYYY"); 
  • one
    What are the errors? - Viacheslav

2 answers 2

Try to remove in the SimpleDateFormat pattern the output of a time zone (the timezone) is a z sign, sometimes the problem may be that the JVM does not parse the timezone from the axis.

  • The error was different, but thanks for the advice. - Jakeroid

It was necessary like this, since the symbol "|" used for official purposes.

 SimpleDateFormat df = new SimpleDateFormat("HH:mm '|' dd.MM.YYYY");