How do I convert a TIMESTAMP
or DATETIME
of MySQL into a GregorianCalendar
of Java? Or a better idea?
In the class, the dataCadastro
field is of type GregorianCalendar
. I'm writing to the database in type TIMESTAMP
dd-MM-yyyy 00:00:00
.
Now I want to do the opposite, get the bank and generate GregorianCalendar
to compose the object.
The idea is to keep the complete data of the user's registration date!
How to do it?