This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Tester programme Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Tester programme" Watch "Tester programme" New topic

Tester programme

xiao sean
Ranch Hand

Joined: Aug 20, 2007
Posts: 44
hi, i would like to check how do i display time from my program?
because i'm require to use double as datatype. my time result will end up 11.0 instead of wat i hoping to show like 11.00 or better still 11:00?

and advice on how do i display date eg 27 09 2007 only instead of everything Mon Sep 10 09:00:00 SGT 2007?
any advice please?

[ September 23, 2007: Message edited by: xiao sean ]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Look at SimpleDateFormat. You can construct a formatting string to put the date in just about any format you can imagine.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Have you checked out Aspose?
subject: Tester programme
It's not a secret anymore!