Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong with this?
Message
From
11/09/1999 14:35:43
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00263572
Message ID:
00263678
Views:
16
Also, I'm not sure if the syntax on the req_date = line is correct.

I think the best way to do it would be:
req_date = EVAL('THISFORM.t_req_date'+ALLT(STR(i))+'.Value')
and then just print DTOC(req_date) or TTOC (req_date) depending on your needs.


>Steve,
>If 't_req_date' is a DateTime field, then you need to use TTOC() not DTOC() to include the time.
>
>HTH
>Barbara
>
>>I keep an getting error or the wrong result when I run the following:
>>
>>FOR i = 1 TO 8
>> req_date = ('THISFORM.t_req_date'+ALLT(STR(i))+'.Value')
>> ? ' Requested Date/Time = ' + DTOC(&req_date)
>>ENDFOR
>>
>>I grab 8 date/times off of my form (out of textboxes) and print them to a file for printing. The "?" line prints a line for each date/time, but the date either prints without a time next to it or I get a syntax/run-time error. I have tried many variations, but I had it working once and then it has not worked since. Please help. Thanks very much.
--Todd Sherman
-Wake Up! Smell the Coffee!
Previous
Reply
Map
View

Click here to load this message in the networking platform