- Code: Select all Expand view RUN
- Function CheckEstrazione()
local oDbf
local dDataEstrazione
local lold:=.t.
local oTimer
local nMartedi:= 2
Local nGiovedi:= 4
local nVenerdi:= 5
local nSabato := 6
local nDayarchive,nDaytoday
oDbf := TArchivioLotto():New()
oDbf:SetOrder(1 )
oDbf:goBottom()
dDataEstrazione:= oDbf:data
oDbf:close()
//determino numero giorno
nDayarchive:= dow(dDataEstrazione) //estrazione salvata
nDaytoday:= dow(date()) //oggi
IF nDaytoday = nMartedi
IF nDayarchive < nDayToday
lOld:=.f.
Endif
Endif
IF nDaytoday = nGiovedi
IF nDayarchive < nDayToday
lOld:=.f.
Endif
Endif
IF nDaytoday = nVenerdi
IF nDayarchive < nDayToday
lOld:=.f.
Endif
Endif
IF nDaytoday = nSabato
IF nDayarchive < nDayToday
lOld:=.f.
Endif
Endif
return lOld
But If I made dow(date()) give me 4 and not 3 ( 23.10.2024) see the picture how I must correct the function ?