File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SimpledateFormat format

 
James Basller
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a long value which I need to convert in CCYYMMDD format.

I have looked in to API and done some googling also but failed to get answer.

I only get what is CC (Century year)

can anyone tell me how can I passed value in the SimpledateFormat's constructor so that I can format long value

like SimpleDateFormat format = new SimpledateFormat("yyMMdd");

thanks!!!
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a long value which I need to convert in CCYYMMDD format.



How is CCYYMMDD different from YYYYMMDD?

Henry
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try "yyyyMMdd" as the format string for SimpleDateFormat.
 
James Basller
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper Young wrote:Try "yyyyMMdd" as the format string for SimpleDateFormat.


Hi,

So, CCYYDDMM is same as yyyyMMdd???

Thanks!!!
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Basller wrote:
Jesper Young wrote:Try "yyyyMMdd" as the format string for SimpleDateFormat.


Hi,

So, CCYYDDMM is same as yyyyMMdd???

Thanks!!!


Well, you are supposed to tell us. We don't know what CCYYDDMM is. But yyyyMMdd means 4 digits for the year (ie. 2009), followed by two digits for the month, followed by two digits for the day ... is that the same as CCYYDDMM?

Henry
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic