File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Formatting SSN...and time

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have some questions about formatting in java...
How do I format a social security number in java?
How do I format time in the hh:mm:ss format?
Thanks in advance!

 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kerri,
I don't know about ss# but for date/time use the following:
SimpleDateFormat sdf = new SimpleDateFormat( "hh:mm:ss" );
It can be found in java.text.* package.
Regards,
Manfred.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Formatting SSN where? Where are you wanting to put it? Or are you talking about data entry on a screen?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic