Use Months between and get the int as return value ----- Original Message ----- From: "sufi malak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 23, 2001 7:00 PM Subject: How to compare month DB & System ?
> I am trying to display some data for the last month rewards, this is a web > application for rewarding employees, so if for example some employees got > rewards for this month the user will see data corresponding, if nobody was > rearded for this month, the page displays reward for the previous month, and > so on. > > from the database(Mysql) I can get the date in this forms (2001-10-01 or > October 1, 2001), and by using the date object from java.util.Date I can get > the number of the month like this : > java.util.Date date = new java.util.Date(); > int m = date.getMonth() + 1; > for example m for this month is 10. > > My question is how to compare 10 to the month in this format (comming from > database) 2001-10-01 > > Thanks lot. > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com
----------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. ------------------------------------------------------------------------------------------------------------------------
