Hi,
How can we select all dates between from date and to date using sql? There are only 2 date fields in the tables such as from date and to date
For example, given the from date 03/1/2011 and the to date 03/5/2011 I want to return:
03/1/2011
03/2/2011
03/3/2011
03/4/2011
03/5/2011
My query is
select intime as InD,outtime as OutD from tbl_attendance where intime between '03/1/2011' and '03/5/2011'
Result:
03/1/2011
03/2/2011
03/3/2011
03/4/2011
Any help would be highly appreciated.
Loading

VulpesRank #55 · 29.2K reputationPosted Mar 16, 2011, 2:06 AM EDT
Elizabeth Rani5 reputationPosted Mar 16, 2011, 2:09 AM EDT
Thanks for the query but i have tried the sane query but this is also showing the same result. their is no change in the result. Is their any other way to retrieve the result.
Any help would be highly appreciated.
VulpesRank #55 · 29.2K reputationPosted Mar 16, 2011, 2:13 AM EDT
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 16, 2011, 2:46 AM EDT
Just try like this
select intime as InD,outtime as OutD from tbl_attendance
where intime > TO_DATE('03/1/2011', 'MM/DD/YYYY') and intime < TO_DATE('03/05/2011', 'MM/DD/YYYY')
Suthish NairRank #92 · 22.8K reputationPosted Mar 16, 2011, 12:29 PM EDT