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?
You can use Date.getTime()
, which returns a long
. You can reverse the process by using the new Date(long)
constructor.