Results 1 to 7 of 7
Thread: BufferedWriter
- 04-21-2010, 02:38 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 2
- Rep Power
- 0
- 04-21-2010, 02:49 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
- 04-21-2010, 04:36 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Or, if you want to control the format of the output, a SimpleDateFormat?
- 04-21-2010, 04:52 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
- 04-21-2010, 05:09 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Depends if they want to learn the format codes or not.
Not that they're particularly difficult.
But if it's just a date an SDF might be simpler?
Who knows, without a spec.
- 04-21-2010, 06:45 PM #6
Senior Member
- Join Date
- Mar 2010
- Posts
- 266
- Rep Power
- 4
Easiest solution - do a
long millis = date.getTime()
and write millis to the data file. The when reading it back, do
Date date = new Date(millis);
- 04-22-2010, 09:23 AM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
Null Pointer Exception with BufferedWriter
By Sasquatch192 in forum New To JavaReplies: 3Last Post: 10-26-2009, 06:32 PM -
How to use BufferedWriter and BufferedReader with PipedWriter and PipedReader
By Java Tip in forum java.ioReplies: 0Last Post: 06-26-2008, 07:33 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks