Subject | Re: Select statement with Date |
---|---|
Author | paul |
Post date | 2004-06-08T01:02:32Z |
Hi,
I have a some doubt about select statement using where clause is
date
Say, I have table with login and logout Date fields,
I need to select the persons whoever logout todays or any of specified
dates.
I am using
GregorianCalendar todayCal = new GregorianCalendar();
java.sql.Date today = new java.sql.Date(todayCal.getTimeInMillis());
"Select EmpName, EmpID from EMP where logoutdate='"+today+"';
I didn't get any values, what is the correct statement for above
situation.
Regards,
N.Paul
[Non-text portions of this message have been removed]
I have a some doubt about select statement using where clause is
date
Say, I have table with login and logout Date fields,
I need to select the persons whoever logout todays or any of specified
dates.
I am using
GregorianCalendar todayCal = new GregorianCalendar();
java.sql.Date today = new java.sql.Date(todayCal.getTimeInMillis());
"Select EmpName, EmpID from EMP where logoutdate='"+today+"';
I didn't get any values, what is the correct statement for above
situation.
Regards,
N.Paul
[Non-text portions of this message have been removed]