>I am trying to write a SPT that will retreive a set of records between two dates. The remote data base fields are numeric(20080505) for example. What does my SPT need to be for say records > 01/01/2007 and < 01/05/2008?
where field > 20070101 and field < 20080105
PROCEDURE DTONUM()
LPARAMETERS dDate
LOCAL cDate
IF !EMPTY(m.dDate)
m.cDate = STR(YEAR(dDate),4,0) + PADL(ALLTRIM(STR(MONTH(m.dDate))),2,"0") + PADL(ALLTRIM(STR(day(m.dDate))),2,"0")
ELSE
m.cDate = "00000000"
ENDIF
RETURN VAL(m.cDate)
ENDPROC