If you have a query to fire , then use the SYSDATE as the standard one.
For example, on Oracle if I query as follows,
"select SYSDATE from DUAL", it should get me today's date. You may need to use this as part of your query. I understand you are in the midst of a Java program
So, after your query is built at Java area, you need to use the word "SYSDATE" which Oracle understands. I think it can work on other Databases too. But you may check it once.
Hope this helped.