title: How to get Current Year in YY Format in Java/Android
body: <p>I am able to get Year in YYYY Format from my below Code.  But I want in YY Format.  Can anyone help?</p>
  
  <pre><code>Calendar c = Calendar.getInstance();
  
  int seconds = c.get(Calendar.SECOND);
  int hour = c.get(Calendar.HOUR_OF_DAY); // IF YOU USE HOUR IT WILL GIVE 12 HOUR USE HOUR_OF_DAY TO GET 24 HOUR FORMAT
  int minutes = c.get(Calendar.MINUTE);
  int date = c.get(Calendar.DATE);
  int month = c.get(Calendar.MONTH) + 1; // in java month starts from 0 not from 1 so for december 11+1 = 12
  int year = c.get(Calendar.YEAR);
  </code></pre>