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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capability not supported - Today() Function

Status
Not open for further replies.

JonnyBee

Programmer
Oct 23, 2002
2
AU
When I ran the query below I got an error message: Capability Not Supported.

SELECT COUNT( CardNo )
FROM "Clients.DB" Clients
WHERE ConExpiry >= Today()
 
I don't think TODAY is supported in SQL. You could use a QBE or create the SQL on the fly (untested):

var
mySQL SQL
currentDate date
dbTables database
endVar

dbTables.open(":WORK:")
;maybe my setup but SQL always seems to want date format as MM/DD/YYYY
currentDate = = "'" + format("DY3,DO(%M/%D/%Y)", today() + "'"

mySQL = SQL

SELECT COUNT( Clients."CardNo" )
FROM "Clients.DB" Clients
WHERE
(Clients."ConExpiry" >= ~currentDate)

endSQL

if not mySQL.executeSQL(dbTables, ":pRIV:ANSWER.DB") then
errorShow()
return
endif

 
Gremlins...
currentDate ="'" + format("DY3,DO(%M/%D/%Y)", today()) + "'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top