How can I convert Date
to DateTime
and vice versa?
E.g.
Date dt = new Date();
Now I want to covert this to DateTime
.
Also
DateTime dtim = new DateTime();
Now I want to convert it to Date.
Is this Joda Time
's DateTime
you're talking about? If so, it will be
dateTime.toDate()