0

System date & time is in SimpleDate format.
How can i convert this into integer?

"sdf.format(new Date(System.currentTimeMillis()))"............. I want to convert current time** into integer** data type.

Plz plz plz help me.
Any help for this is alwayz welcome.

2
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by pooja.shinde
0

Can you give an example? The currentTimeMillis() method returns a long representing the elapsed time from a fixed time.

0

Ok. I got the solution. SimpleDateFormat has method format() which gives answer in our specified format just like hh:mm:ss. There are other formats also. We can then convert it into any datataype which is convinient to use.

Thanks.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.