Category Archives: Date

Date and SimpleDateFormat

http://stackoverflow.com/questions/1459656/how-to-get-the-current-time-in-yyyy-mm-dd-hhmisec-millisecond-format-in-java date.toString() would do if wanted to have a SimpleDateFormat(yyyy-MM-dd HH mm ss SSS)   Parsing back to Date from String.. http://stackoverflow.com/questions/9431927/how-to-convert-date-tostring-back-to-date Date d = new Date(); long l = d.getTime(); Date theSameDate = new Date(l); Date d = new Date(); String s = d.toString; Date theSameDate = new SimpleDateFormat(“EEE MMM dd HH:mm:ss zzz yyyy”).parse(s);… Read More »