• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Printing date

 
Ranch Hand
Posts: 71
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to print the date as 13 Sept 2010 using a single line of code?
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Deepak Kumar Jena wrote:How to print the date as 13 Sept 2010 using a single line of code?


 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Joanne Neal wrote:

Deepak Kumar Jena wrote:How to print the date as 13 Sept 2010 using a single line of code?




I'd be surprised if that's really what he meant.
 
Marshal
Posts: 71096
292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne! Really!

There are useful hints in the documentation for Formatter. And search the Java™ Tutorials for "formatting". If you keep going long enough, you will actually find an example for dates.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Joanne! Really!



You're right. I should only have given some hints rather than the actual code. Sorry.
 
Deepak Kumar Jena
Ranch Hand
Posts: 71
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yah Sebastian has got some idea about what I was looking for (Date Format). Thanks Ritchie for giving me the hint.
 
Saloon Keeper
Posts: 12496
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Joanne Neal wrote:

Campbell Ritchie wrote:Joanne! Really!



You're right. I should only have given some hints rather than the actual code. Sorry.



 
Campbell Ritchie
Marshal
Posts: 71096
292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never said anything about DateFormat, but that will probably work too.
 
Deepak Kumar Jena
Ranch Hand
Posts: 71
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all. I have done it.
 
Campbell Ritchie
Marshal
Posts: 71096
292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done. How did you do it?
 
Deepak Kumar Jena
Ranch Hand
Posts: 71
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
bacon. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic