Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Range in SQL qry

Status
Not open for further replies.

acr1

Programmer
Oct 12, 2001
73
NZ
Team
I am continually impressed by the support given on this site..

My question is that I have a date range in a SI Vs 7.0 qry which does not bring date values for the actual date as below. i.e If you specified todays date..then no data would appear however if you specified tomorrows date then Hey Presto...

and central_enquiry.log_effective_date between to_date('{?FromDate}','dd/mm/yyyy') and to_date('{?ToDate}','dd/mm/yyyy')

I assume I need syntax similar to &quot;>= and <=&quot; but am a bit lost..

TIA

 
try:

in {FromDate} to {ToDate} Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
It may be that you are working with DateTime fields, and by not specifying a time you are telling it to use time 0 of that day, which is midnight. That would exclude any record on that date with a real time value. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Ken
Thanks for your help......Yes all the Oracle fields are combo date/time fields...

A question I have is ..Could I modify the format below to allow for the time as you have mentioned above.

to_char(job.actual_comp_date,'dd/mm/yy')actual_comp_date

TIA
 
Sure, acr1.

Change
to_char(job.actual_comp_date,'dd/mm/yy')actual_comp_date

to

to_char(job.actual_comp_date,'dd/mm/yy hh:mi:ss')actual_comp_date

Naith
 
hi
when i try to add a field from an oracle source in my report, which is in DATE format, i can´t filter the time from it (like in oracle &quot;TO_CHAR (aDate,'hh24:mi')&quot;). but i have to show the time in my report. WHAT CAN I DO.
thx in advance,
AJ
 
schiffi,
please start a new thread for this question. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top