Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making CTOD() work in Europe
Message
From
19/11/2018 15:11:05
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01663465
Message ID:
01663559
Views:
40
>>>I have many places where the code is (when initializing a field to an empty date):
>>>
>>>
>>>replace MyField with ctod('  /  /  ')
>>>
>>>
>>>Do I understand correctly that the above will work regardless of the SET DATE TO and I don't need to change it?
>>>TIA
>>
>>I don't remember if that always works or not. I would use this just to be sure:
>>
>>
REPLACE MyField WITH {}
>
>Thank you.

I just came across this too. You can use this code below and it will generate a message showing every line in your app where CTOD() is along with the source code that's there (in the .err file):
SET STRICTDATE TO 2
If you have that set to 2, it will generate compile-time errors for every CTOD() or CTOT() reference, because they can produce ambiguous results. It would help you see all of the cases where there are CTOD() types in your code. You could parse the .err file and load them into a table and categorize them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform