title: how to get date format like yyyy-mm-dd am in java
body: <p>I need to get date format like:</p>
  
  <pre><code>"yyyy-mm-dd am"
  </code></pre>
  
  <p>or</p>
  
  <pre><code>"yyyy-mm-dd pm"
  </code></pre>
  
  <p>In Java for Android</p>
  
  <p>I do not need current time, only <strong>yyyy-mm-dd</strong> plus <strong>am</strong>/<strong>pm</strong></p>
  
  <p>how to make it directly ?</p>
  
  <p>i use the method below to get current date:</p>
  
  <pre><code>    private static String getDate(){
          Calendar c = Calendar.getInstance();
          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
          return sdf.format(c.getTime());
      }
  </code></pre>