| Author |
I need a date... No, really!
|
George Larry
Ranch Hand
Joined: Nov 07, 2001
Posts: 52
|
|
|
How can I get todays date as a string in the form mm/dd/yy?
|
 |
Junilu Lacar
Bartender
Joined: Feb 26, 2001
Posts: 4115
|
|
try SimpleDateFormat("MM/dd/yy") or if you are using JSPs, you might try using the Jakarta DateTime Taglibs Junilu
|
Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
|
 |
George Larry
Ranch Hand
Joined: Nov 07, 2001
Posts: 52
|
|
Yes, but how do I get TODAY's date?... that's the first part, then I need to convert it to a string in the mm/dd/yy format. Thanks.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
java.util.Date now = new java.util.Date(); Initializes "now" to the current time and date. Then you can use the dateformatting code listed above to get it as a String. This isn't JSP-related, BTW -- it's basic Java.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: I need a date... No, really!
|
|
|