Working with Dates in Java
<p>I need to work with dates and I wasn't sure how to go about that in Java since I have never done it before. </p>

<p>I am pulling dates from the Excel file and they can be retrieved in the Data format which would represent the date. </p>

<p>Ex:</p>

<ol>
<li>2/1/2010</li>
<li>5/12/2011</li>
<li>8/15/2011</li>
<li>9/1/2011</li>
<li>9/1/2011</li>
</ol>

<p>All my codes are pretty irrelvent to the question, but I am setting up a getter/setter method:</p>

<pre><code>public Date getDate() {
    return date;
}

public void setDate(Date date) {
    this.date = date;
}
</code></pre>

<p>So my question is this, in what way when I am pulling the data from Excel:</p>

<pre><code>    temp.setDate((row.getCell(3).getDateCellValue());
</code></pre>

<p>I can set the limit so it only retrieves data from x amount of months. 8, 12, et.. from the last month/year displayed in the file, instead of going back all the way to 2010? I can provide more details if needed.</p>

<p>Edit: This is what I have now:</p>

<pre><code>   import java.util.Date;
    Date date;
   date = row.getCell(3).getDateCellValue();
</code></pre>

<p>It shows: Tue June 01 00:00:00</p>

<p>I don't care about Tuesday or 00:00:00, I just have a whole list of data and I only want to show x amount of months.</p>

<p>Edit: I figured it out. :)</p>
