• Post Reply Bookmark Topic Watch Topic
  • New Topic

ONE MORE TIME! Date from String, etc..  RSS feed

 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know I've done the search, but even the answers don't work.
I need to convert an item from a text file to a Date and am using the following coder to do it.

The code to read it is:

The data is :

Mike,Bright,Essays on Soap,8/27/2002
John,Smith,When I Am Clean,8/27/2002
John,Smith,Essays on Soap,8/27/2002
Sally,Baker,Essays on Soap,8/28/2002
Mike,Bright,When I Am Clean,8/29/2002

and the dates I get as a result are JAN 27, 2002, etc...
HELP!! :roll:
 
Hari Gangadharan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using the wrong pattern. The correct code is:

Also it is better to create only one instance of SimpleDateFormatter. Hope this helps.
[ February 05, 2003: Message edited by: Hari Gangadharan ]
 
Sam Smoot
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That Worked!
THANKS
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!