![]() |
|
#1
|
||||
|
||||
|
to make a timestamp of today's date and time down to the second (year month day hour minute seconds), using the 24 hour military time clock, do this:
Code:
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHmmss");
java.util.Date today = new java.util.Date();
System.out.println(formatter.format(new java.sql.Timestamp(today.getTime())));
__________________
Nick Humphrey Download for free my experimental music, art, poetry and pictures. My album Classic E B-sides can be purchased on both itunes and amazon.com. Help me improve my phrasebook of world languages. I offer remote healing services. My blog. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to convert java.util.Calendar object to java.sql.Date | Nickleus | Java Forum | 0 | 14-07-08 15:39 |
| how to convert rip an encrypted dvd to ipod format | Nickleus | Lyd og video forum | 0 | 18-12-07 23:17 |
| date modified and date created annoyance | Nickleus | Windows Vista forum | 0 | 05-09-07 11:06 |
| how to write the date in java in numbers only, like 20070814 | Nickleus | Java Forum | 0 | 14-08-07 16:05 |
| Bruk Excel og Textpad til å konvertere amerikansk timestamp til militær tid | Nickleus | Textpad forum | 0 | 20-12-04 00:00 |