code: public static Date parseTimestampToDate(String timestamp) {
          Date d = null;
          try {
              long millis = Long.parseLong(timestamp) * 1000;
              d = new Date(millis);
          } catch (Exception e) {
              // ignore; will return null
          }
  
          return d;
      }
docs: Create a Date object from a Unix timestamp.
  <br>
  A Unix timestamp is is the number of seconds that have elapsed since
  January 1, 1970. This value is converted into milliseconds, then used
  to create a Date object.
  <br>
  If the timestamp is not a valid long, this method will return null.
  
  @param timestamp Unix timestamp to convert to a Date.
  @return the timestamp as a Java Date object, or null if the timestamp is
  invalid.