title: How do I prevent the java.lang.Numberformatexception Invalid Long: error
body: <p>I want my app to display time past on a textview e.g 3 mins ago. So I have a parse.com class that has a </p>
  
  <pre><code>public String get timestamp()
  { 
  return get string("timestamp")
  } 
  </code></pre>
  
  <p>and a </p>
  
  <pre><code>public void set timestamp(String Value) 
  {
  put("timestamp",Value)
  }
  </code></pre>
  
  <p>I have a postActivity that is sets the timestamp. First I got the current system time </p>
  
  <pre><code>Long time=System.currentTimeMilli(); String timeset = time.toString();
  Post post = new Post();
  post.set timestamp(timeset);
  </code></pre>
  
  <p>On my mainActivity where I retrieve my views, I have a </p>
  
  <pre><code>Textview time = (Textview) view.findViewById(R.id.txttime);
  CharSequence timeAgo =  
  DateUtils.getRelativeTimeSpanString(Long.parseLong(post.getTimestamp()),
  System.currentTimeMillis(),DateUtils.SECOND_IN_MILLIS);
  time.setText(timeAgo); 
  </code></pre>
  
  <p>I get the <code>java.lang.numberformatexception</code> when on <code>the(Long.parseLong(post.getTimestamp()))</code></p>
  
  <p>line How do I prevent it?Thanks</p>