Hi All,
I want to compare current date with date which is entered by the user.
In my form i am having fields as
Name:
TicketNO:
ContactNo:
Issue Dt: 13/7/2009
Return Date:17/7/2009
the above data is collected from user and entered into database and i want to compare issue date with the system date and when return date is come i want to send mail to user that your Return date is today...

Please help me in this regards quickly

Thanks in advance....

rajshree13,
Use select query with where caluse.

select * from tablename where adate='1-1-2002'"

rajshree13,
Use select query with where caluse.

select * from tablename where adate='1-1-2002'"

Not sure about your advice, because as I understand question rajshree13 want to send email out when system time match with issue date in database. For that you will need to use Timer with schedule(TimerTask task, Date time). So basically you will:

  • fire up a task on given time
  • get system date
  • query database with system date to get all entries matching this date
  • send emails
  • and reschedule timer
SELECT (MONTH(CURDATE-MONTH(issudate)) AS ' Months' FROM table Union
SELECT (DAY(CURDATE-MONTH(issudate)) AS 'Days' FROM table Union 
SELECT (YEAR(CURDATE-MONTH(issudate)) AS 'Year' FROM table

it may help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.