MySQL Forums
Forum List  »  General

date manipulation
Posted by: abdul atta
Date: January 29, 2005 07:34AM

Hi there,
I am busy writing a java code .i want to execute a certain section of code every six months.i have a table in mysql db, which has a DATETIME field dt, and username.
can any body help me find username,e.g if date field contains 01-01-2005 00:00:00 i want to call a method after every six months. i.e 01-07-2005, 01-01-2006,...
pls send me a select statement that does this, i don know if i can use triggers in java.
i am thinking along the line of
select username from table1
where mod( numberOfmonths(currentdate(),dt)/6)=0;
but i cant seem to find the right functions to to this.

You help is appreciated.

Options: ReplyQuote


Subject
Written By
Posted
date manipulation
January 29, 2005 07:34AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.