[Stackoverflow] [Progress OpenEdge ABL] How to compare dates in a sql script to progress database?

Status
Not open for further replies.
C

CR15 BRN

Guest
We have a field in our progress database which is DATETIME-TZ so an example of the data is "23/05/2019 12:11:16.099" - I'm need some help to compare dates in this field with an SQL select statement

In progress procedure editor, I can compare dates easily, for example

select date(bond-no) from accadd where date(bond-no) <= Today

This works perfectly, but i need to get this info via sql for a web page and just get an error, even breaking the field down as a substring and making the date back up doesn't seem to work

SELECT date(""bond-no"") FROM accadd WHERE date(""bond-no"") <= Date()

Have tried variations on the above and this too...

DATE(SUBSTRING(""bond-no"",4,2),SUBSTRING(""bond-no"",1,2),SUBSTRING(""bond-no"",7,4))

This should return just dates earlier than today, but just get the old syntax incorrect message, so i'm missing something somewhere

[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Syntax error in SQL statement at or about ") FROM accadd WHERE" (10713)

Continue reading...
 
Status
Not open for further replies.
Top