A
A
Amigo20192022-02-24 18:18:57
Java
Amigo2019, 2022-02-24 18:18:57

How to get time now (yyyy-mm-dd hh:mm:cc:ccc) in XMLGregorianCalendar?

Good afternoon!
How to get time now (yyyy-mm-dd hh:mm:cc:ccc) in XMLGregorianCalendar?
It can be different but with conversion

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kileev, 2022-02-24
@akileev

It is possible like this:

import javax.xml.datatype.DatatypeFactory;
import java.util.GregorianCalendar;

GregorianCalendar calendar = new GregorianCalendar();
DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question