Quantcast
Channel: Java mon amour
Viewing all articles
Browse latest Browse all 1121

currentTimeMillis reverse lookup, AKA "from currentTimeMillis to date" in WLST

$
0
0
If you have a timestamp expressed as

System.currentTimeMillis()

=1373941644513  

you can transform it into a readable date this way:

from java.text import SimpleDateFormat 
from java.util import Date

sdf =SimpleDateFormat("MMM dd,yyyy HH:mm")
mydate = Date(1373941644513)
print sdf.format(mydate)

Jul 16,2013 04:27



Viewing all articles
Browse latest Browse all 1121

Trending Articles