Re: Newbie Date SimpleDateFormat HELL
From: Nobody (nobody_at_domain.invalid)
Date: 02/23/05
- Next message: Zafar: "HOW TO HANDLE CONTROL_LOGOFF_EVENT handler in JAVA"
- Previous message: Tony Dahlman: "Re: How does a thread call a synchronized method??"
- In reply to: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Next in thread: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Reply: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Reply: baobao: "Re: Newbie Date SimpleDateFormat HELL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Feb 2005 06:39:51 GMT
myfirstname@gmx.net wrote...
> In message <MPG.1c85d32932cffdef98a0f7@news.verizon.net>,
> Nobody wrote on Wed, 23 Feb 2005 04:51:54 GMT:
>
> > I'm trying to create an ANSI date string to use at the end of a file
> > name. "20050222" for today, for example.
> [...]
> > SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMdd" ) ;
> > Date date = new Date() ;
>
> String formattedDate = sdf.format( date );
>
> http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html
>
> I don't know what you are trying to do with that Stringbuffer...
Oh, just fumbling through the doc for SimpleDateFormat...
format
public StringBuffer format(Date date,
StringBuffer toAppendTo,
FieldPosition pos)
Formats the given Date into a date/time string and appends the result to the given StringBuffer.
- Next message: Zafar: "HOW TO HANDLE CONTROL_LOGOFF_EVENT handler in JAVA"
- Previous message: Tony Dahlman: "Re: How does a thread call a synchronized method??"
- In reply to: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Next in thread: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Reply: Tilman Bohn: "Re: Newbie Date SimpleDateFormat HELL"
- Reply: baobao: "Re: Newbie Date SimpleDateFormat HELL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|