Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display date format by calendar entry

 
dumani jayasinghe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got the date entry as 9/23/11 from the my calendar entry.I use the US locale.
How can i get the date as 2011-09-23 using the US locale.
Please any one can help me.

Thank you
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaDatesFaq
 
dumani jayasinghe
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using the given code.But is returns 9/23/11. I need to get 2011-09-23.




thanks
 
Campbell Ritchie
Sheriff
Pie
Posts: 50225
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That will most probably not work, but you can find all the %T tags in the java.util.Formatter class documentation.>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic