Date with Timestamp problem.

Hi,

We are using Informix as backend. All the dates are used with timestamp. When I try to give filter condition in condition block for the date, say for example
order_date >= 'begin date" and order_date<= “end date” and I am selecting the date values from values button when I run, it gives sql sentence error called non-numeric chars in date. To avoid this error what should I do? Please give me any suggestions.

Ravi.

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


Listserv Archives (BOB member since 2002-06-25)

We are using Informix as backend. All the dates are used with timestamp. When I try to give filter condition in condition block for the date, say for example order_date >= 'begin date" and order_date<= “end date” and I am selecting the date values from values button when I run, it gives sql sentence error called non-numeric chars in date. To avoid this error what should I do? Please give me any suggestions.

it looks to me that your condition compares the timestamp to a string representation of a date: “begin date”, and “end date”. hence, simply convert the timestamp to a date and you should be fine.

I’m not sure about the ISQL syntax for converting timestamps to dates, but there should be a function like DATE().

The condition should then look like this:

DATE(order_date) BETWEEN begin_date AND end_date

hope this helps,
mirko


Listserv Archives (BOB member since 2002-06-25)