The Royal Nick Humphrey Global World IT Forum, Home Edition  

Go Back   The Royal Nick Humphrey Global World IT Forum, Home Edition > Programmering Forum > Java Forum
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 09-08-09, 18:31
Nickleus's Avatar
Nickleus Nickleus is offline
Nick Humphrey - Admin
 
Join Date: 06 Apr 2004
Location: Noreg
Posts: 2,794
Send a message via MSN to Nickleus Send a message via Skype™ to Nickleus
Default java today's date timestamp format yyyymmddhhmmss

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())));
http://java.sun.com/j2se/1.3/docs/ap...ateFormat.html
__________________
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +2. The time now is 03:33.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Check out my phrasebook
All rights reserved 2004-2009