Reputation: 39
Here is my code to assign a value to the Date:
long saveddatevalue = new Date().getTime();
I just want to know, what does this saved long variable actually show? I wish to use this to output values within a certain number of days.
Thanks!
Upvotes: 1
Views: 5585
Reputation: 32954
It is far easier to work with java.util.Calendar.add(int, int)
for manipulating dates. Here is some sample code.
Upvotes: 0
Reputation: 1502126
It will basically give you the same result as System.currentTimeMillis()
- the number of milliseconds since the Unix epoch of midnight January 1st 1970, UTC.
Upvotes: 3