Question

I would like to save a Date object into an RMS in Java ME. The way I would like to do it is by converting the date first to some String/int/any primitive data type value that the RMS can save. I then would like to read this data back and create a Date object from it. So how can I do this?

Était-ce utile?

La solution

You can use Date.getTime(), which returns a long. You can reverse the process by using the new Date(long) constructor.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top