Java Date Formatter

, , , , , , , Sende Yorum Yap

Her seferinde javada tarih(Date) objesini istediğim formatta yazıya(String) çevirmem gerektiğinde googleda aramaktan bıktım :) . Örnek kod aşşağıda:

I’ve got bored to googling everytime when I need to convert Date object to String in a format that I wanted :) . Example code is below:

SimpleDateFormat formatter= new SimpleDateFormat ("yyyy.MM.dd ww 'at' hh:mm:ss a zzz");
Date now = new Date();
System.out.println("for:" + formatter.format( now ));

Paylaş - Share :
  • Twitter
  • Facebook
  • LinkedIn
  • del.icio.us
  • Tumblr
  • Diigo
  • StumbleUpon
  • Technorati
  • Google Bookmarks
  • RSS
Alakalı Yazılar - Related Posts:

Yorum Yazmayı Unutma

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in