This topic is locked
[SOLVED]

 Help with Custom View with date range?

1/19/2011 12:28:18 PM
ASPRunnerPro General questions
G
GerryT author

I am trying to pull records from a table where the Market ='Jacksonville' and the date range is between 12/22/2010 and 01/21/2011. Below is my Query but it is not displaying any records. I am able to view just the market if I remove the between query for the date ranges. Does it have to do with the table recording the date with the time (ex. 1/18/2011 10:23:21 PM) if so what would the query look like? It would be better if it was able to pull the same date ranges for the current month, but I am unsure how to do it. Any help is appreciated thanks!
SELECT

Ticket_Number,

Creation_Date,

CAE_Name,

Market,

Business_Name,

Account_Number,

Lead_ID,

Callers_Name,

Customers_Address,

Customers_City,

Customers_Zip,

Customers_Phone,

Customers_Alt_Phone,

Customers_Hours,

Node,

LOB,

Customer_Request,

Department,

Repeat_Issue,

Issue,

Status,

Owner,

Referred_To,

Pending_Next_Steps,

Final_Resolution,

Valid_Escalation,

Screenshot,

[Attachment 1],

[Attachment 2],

Last_Touched

FROM escalations

WHERE (Creation_Date BETWEEN 12/22/2010 and 01/21/2011) AND (Market ='Jacksonville')

Sergey Kornilov admin 1/19/2011

Try this:

where (Creation_Date between #2010-12-22# and #2011-01-21#) AND (Market ='Jacksonville')


You need to check MS Access manual for more info on handling date values. You can also find a number of tutorials on the web:

http://delphi.about.com/od/delphitips2007/qt/datetime_sql.htm

G
GerryT author 1/19/2011

you are a genius! thank you! it worked.