title: Comparing a Date with the current Date results in NumberFormatException
body: <p>I'm trying to compare a date/time (that I saved in a SharedPreferences) with the current date/time. </p>
  
  <p>With this I'm checking when the last time was that the service did ran, and if it is necessary to run again.</p>
  
  <p>I'm converting the current date to an integer. But then I get an error:
  Error:</p>
  
  <blockquote>
    <p>08-27 17:21:40.930: W/System.err(26577): java.lang.NumberFormatException: Invalid int: "201308271721"</p>
  </blockquote>
  
  <p>Full error:</p>
  
  <blockquote>
    <p>08-27 17:21:40.930: W/System.err(26577): java.lang.NumberFormatException: Invalid int: "201308271721"
    08-27 17:21:40.960: W/System.err(26577):   at java.lang.Integer.invalidInt(Integer.java:138)
    08-27 17:21:40.960: W/System.err(26577):   at java.lang.Integer.parse(Integer.java:378)
    08-27 17:21:40.960: W/System.err(26577):   at java.lang.Integer.parseInt(Integer.java:366)
    08-27 17:21:40.960: W/System.err(26577):   at java.lang.Integer.parseInt(Integer.java:332)
    08-27 17:21:40.960: W/System.err(26577):   at 
    xxx.xxx.RoosterSync.onHandleIntent(RoosterSync.java:118)
    08-27 17:21:40.960: W/System.err(26577):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
    08-27 17:21:40.960: W/System.err(26577):   at android.os.Handler.dispatchMessage(Handler.java:99)
    08-27 17:21:40.960: W/System.err(26577):   at android.os.Looper.loop(Looper.java:137)
    08-27 17:21:40.960: W/System.err(26577):   at android.os.HandlerThread.run(HandlerThread.java:60)</p>
  </blockquote>
  
  <p>The (peace of) code i'm using:</p>
  
  <pre><code>Date now = new Date();
  String nowAsString = new SimpleDateFormat("yyyyMMddHHmm").format(now);
  dayNow= Integer.parseInt(nowAsString);
  </code></pre>
  
  <p>Is it possible to convert a date-string to an integer? </p>
  
  <p>Or am I doing something stupid and is there an easier way?</p>