in a select when I search for a date I use
SELECT * FROM customer WHERE HIREDATE= " +DTOS(DATE())
How do I use the date search with locate?
I tried
cLocate := " HIREDATE = '" + DTOS(DATE()) + "'"
But I have this error
Error occurred at: 10/21/24, 10:57:32
Error description: Error BASE/1071 Argument error: =
Args:
[ 1] = D 09/18/92
[ 2] = C 20241021
- Code: Select all Expand view
- #include "fivewin.ch"
#include "dbcombo.ch"
//----------------------------------------------------------------------------//
function Main()
local oCn, oRs
local oDlg, oBrw, cLocate := ''
//FWNumFormat( "A", .t. )
oCn := FW_DemoDB()
oCn:LockTimeOut := 1
oCn:lShowErrors := .t.
//oRs := oCn:RowSet( "SELECT ID,FIRST,CITY,SALARY FROM customer" )
oRs := oCn:RowSet( "SELECT * FROM customer ")
xbrowse(oRs)
cLocate := " HIREDATE ='" + DTOS(DATE()) + "'"
? oRs:Locate(cLocate)
xbrowse(oRs)
return nil
Maurizio