File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Reformat a date string

 
Barry Brashear
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a date string in the format 'yyyy-mm-dd' which I need to present
in a dialog as 'ddMMM'. Does anyone know how to accomplish this?

Thanks.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I assume you meant ddmm as the reformat? Is so, try the following:


HTH,
M
 
Greg T Robertson
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the reference for Date Format and SimpleDateFormat

you will probably need to convert use DateFormat to get a timestamp first and then convert it to the text string you need using a differnt DateFormat object especially if you meant MMM (like May, Apr, Jun, etc)
[ October 22, 2004: Message edited by: Greg T Robertson ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic