• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

time pattern for milli second

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To display milli seconds, What Should I put for milli seconds after seconds in the
time pattern HH:mm:ss??? Thanks.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bit of a vague question. I'm going to guess you mean by this "what pattern to I pass to the constructor of java.text.SimpleDateFormat to display the millisecond in a Date?" in which case a millisecond is represented by a capital "S".
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by S. Palanigounder:
To display milli seconds, What Should I put for milli seconds after seconds in the
time pattern HH:mm:ss??? Thanks.



In java document

S Millisecond Number



So you can use "S"

Example
"yyyy-MM-dd'T'HH:mm:ss.SSSZ" --> 2001-07-04T12:08:56.235-0700
reply
    Bookmark Topic Watch Topic
  • New Topic