Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with this function: dow(sys(10,fec1))
Message
From
17/11/2004 12:22:07
 
 
To
17/11/2004 10:19:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00962200
Message ID:
00962271
Views:
14
This message has been marked as the solution to the initial question of the thread.
what seems strange to me is you are asking for the numeric value with sys(11, fieldname), then you are val() that result. That seems like double work to me or that it should be failing.
and DOW() is expecting a date or time value, and you are sending a character string with sys(10, fieldname).
I think that you have those to sys calls reversed. Can you try changing the 11's to 10's and the 10's to 11's?

HTH
Beth
>
>         trecib=(val(sys(11,tablest.freciborep))-val(sys(11,tablest.fech_fin)))
>         XLSheet.Cells(i+1,13).value = TRECIB
>         fec1=val(sys(11,tablest.fech_fin))
>         fec2=val(sys(11,tablest.freciborep))
>         contador=0
>         do while  fec1<>fec2
>             if dow(sys(10,(fec1))=1 or dow(sys(10,fec1))=7
>                contador=contador+1
>             endif
>             fec1=fec1+1
>         enddo
>
Previous
Reply
Map
View

Click here to load this message in the networking platform