title: Getting DatePicker value in new Activity
body: <p>Hi and thanks for looking at this newbi question.</p>
  
  <p>I have looked for anykind of answer that is relevent to my problem and cant seem to find the problem that Im having or maybe I need someone to explain what Im doing wrong. </p>
  
  <p>Anyway my problem is that I am trying to learn Intents and passing data between activities putExtra, getExtra and so on.., so I have created a very simple app with its function to just pass the selected date from a date picker into the new activity and display it on the screen.
  I must be doing something wrong as I get a "android.content.res.Resources$NotFoundException" when I click the button to start the next activity I have tried different code from other answered questions but to no avail, Is there something im missing?.
  My code is below and thankyou for a second time to all of you for any answers.  </p>
  
  <p>first activity</p>
  
  <pre><code>package date.Picker;
  
  
  
  
  import android.app.Activity; 
  import android.content.Intent;
  import android.os.Bundle; 
  import android.view.View; 
  import android.view.View.OnClickListener;
  import android.widget.Button;
  import android.widget.DatePicker;   
  
  
  public class DatePickerActivity extends Activity  {           
  
   int year;  
   int month;  
   int day; 
  
  Button selectButton;
  DatePicker datePicker;
  
  
  @Override    
  public void onCreate(Bundle savedInstanceState) {        
      super.onCreate(savedInstanceState);         
      setContentView(R.layout.main);                   
  
      datePicker = (DatePicker) findViewById(R.id.datePicker);
      selectButton = (Button) findViewById(R.id.selectButton);
      selectButton.setOnClickListener(new OnClickListener()
      {           
  
  public void onClick(View v){         
  
      Intent intent = new Intent(getApplicationContext(),        datePickerResult.class);
  
      month = datePicker.getMonth();  
      day = datePicker.getDayOfMonth(); 
      year = datePicker.getYear();
  
  
      intent.putExtra("year",year);  
      intent.putExtra("month",month);  
      intent.putExtra("day",day);  
  
      startActivity(intent);
  
  
      } 
  
      });
  }
   }
  </code></pre>
  
  <p>second activity</p>
  
  <pre><code>package date.Picker;
  
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.widget.TextView;
  
   public class datePickerResult extends Activity {
  
   int year;  
   int month;  
   int day; 
  
   TextView textView1;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.dpresult);
  
  textView1 = (TextView)findViewById(R.id.textView1); 
  
  Bundle extras = getIntent().getExtras();  
  
      extras.getBundle("year"); 
      extras.getBundle("day");  
      extras.getBundle("month");  
  
  
      textView1.setText(year);
   }
  }
  </code></pre>
  
  <p>So thankyou for any answers or help that you have. Sorry if its a bit of a time waster.</p>