-2

I have the output

Mon Feb 19 02:43:13 EST 2018

Which I've obtained from

System.out.println(new Date());//+ some adjustments with the calendar obviously.

I was curious how I would 'reload' the 'date' from the given output

Mon Feb 19 02:43:13 EST 2018

So if I wanted to refer to the date again when I reload my program, I want it to parse the String and set the date based off of those parameters, is this a good way to handle this?

Gaurav Jeswani
  • 4,410
  • 6
  • 26
  • 47
Eggspurt
  • 63
  • 1
  • 9

1 Answers1

1

The best idea I would have is storing the date in a document, I have done this in a similar fashion. I had taken the Unix epoch time, stored the value, then had a converter bring it back to the human readable version. Not too complex.

no name
  • 72
  • 6