This content has been marked as final. Show 2 replies
You should add the format to the column in your report
Look here -> http://www.techonthenet.com/oracle/functions/to_date.php for a good description of to_date and the date/time formats.
If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
Time variables (example, 10:45 AM) are similar to non-integral numbers (example, 3.17) in that a test for "<variable>=3" possibly gets 3, 3., 3.0, 3.00, etc. but not 3.17. So if you are able to get a date picker to give you hours, minutes and seconds, perhaps you want something like:
where between to_date ('2013/04/30', 'yyyy/mm/dd') AND to_date ('2013/05/02', 'yyyy/mm/dd')
[Here I assume you have date pickers for a *beginning date* and an *ending date*.]
where :given_date between to_date(:BEGIN_DATE, 'yyyy/mm/dd hh24:mi:ss') AND to_date(:END_DATE, 'yyyy/mm/dd hh24:mi:ss')
If only hours and minutes, then:
If only days, then perhaps:
where :given_date between to_date(:BEGIN_DATE, 'yyyy/mm/dd hh24:mi') AND to_date(:END_DATE, 'yyyy/mm/dd hh24:mi')
For this last one, you only get the first second of the ending date/day unless you add the rest of the day ('23:59"59') to the comparison.
where :given_date between to_date(:BEGIN_DATE, 'yyyy/mm/dd') AND to_date(:END_DATE || 23:59:59', 'yyyy/mm/dd hh24:mi')
Hope this helps some,