A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
Joined: Nov 25, 2004
Nov 25, 2004 06:05:00
Hello need some help !
i take in a
that looks like timePattern
I just wonder how i change the output format when converting this
if i make a print out on the result now i got Thu Nov 25 00:00:00 CET 2004
if i want for example 2004-11-30 12:33:35 how do i do that.
String timePattern = "yyyy-MM-dd";
formatter = new
Date d = null;
d = formatter.parse(publishDate, new
} catch (
System.out.print(d) // gives Thu Nov 25 00:00:00 CET 2004
Joined: Oct 12, 2000
Nov 25, 2004 06:29:00
has output functions as well as input functions.
check the API docs... it's what they're there fore, learn to use them.
Marilyn de Queiroz
Joined: Jul 22, 2000
Nov 25, 2004 14:41:00
an explanation of how to use
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
Can someone please help me parse this date
converting string yyyy/MM/dd to java.util.Date
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015