This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Formatting SSN...and time Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Formatting SSN...and time" Watch "Formatting SSN...and time" New topic
Author

Formatting SSN...and time

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jan 09, 2001
Posts: 1492
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

Joined: May 17, 2001
Posts: 2823
Formatting SSN where? Where are you wanting to put it? Or are you talking about data entry on a screen?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Formatting SSN...and time
 
Similar Threads
CSS ????
Java Data and time pattern
phone number formatter in struts2
Simple Person Program
Steps to check out from svn by ANT script: