File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "date format" Watch "date format" New topic

date format

phani ravinutala

Joined: Jun 25, 2009
Posts: 26
I want to build a query by using the condition month and year of date not the day.

Here is my query;

But the above query is very slow. Is there any other date format for month and year to make it faster.

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
I don't think an SQL based query belongs into the JSP forum.

If your empdate field is indexed, this key cannot be used if you use it with a function.

This way the key is usable

JDBCSupport - An easy to use, light-weight JDBC framework -
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: date format
It's not a secret anymore!