title: unix timestamp to datetime in android
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4375982/converting-timestamp-as-string-to-date-in-android">Converting Timestamp as String to Date in android</a>  </p>
  </blockquote>
  
  
  
  <p>My server is returning a timestamp 1322400600 in String, In my android application, i need to convert it like Nov 27, 2011 07:00am. I don't know how to do this please help me out.</p>
  
  <p>-
  Thanks
  AvMishra</p>
  
  <p><strong>Solutions:</strong></p>
  
  <p>I used following code to get the desired value</p>
  
  <pre><code>long dv = Long.valueOf(timestamp_in_string)*1000;// its need to be in milisecond
  Date df = new java.util.Date(dv);
  String vv = new SimpleDateFormat("MM dd, yyyy hh:mma").format(df);
  </code></pre>