E
E
evgenyt20002021-10-08 20:13:56
Java
evgenyt2000, 2021-10-08 20:13:56

How to make a colon?

Good evening!
Question (code below) how to make a colon in offset?

return new SimpleDateFormat("yyyy-MM-ddZ").format(fullTime);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Kotler, 2021-10-08
@kotler-dev

Put a colon in the pattern.

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z");
System.out.println("date: " + dateFormat.format( new Date() ) );

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question