Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in VFP date handling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00222614
Message ID:
00223308
Vues:
40
>>>Set
>>>
>>>SET SYSFORMATS ON
>>>
>>>in Visual FoxPro
>>>
>>>
>>>In Windows Control Panel / Regional Settings
>>>
>>>set date format to
>>>
>>>yy/dd/mm
>>>
>>>
>>>After this setting, many vfp date commands will stop working properly.
>>>
>>>For example,
>>>
>>>?ctod(dtoc(date()))=date()
>>>
>>>returns .f.
>>>
>>>
>>>Also, date in textbox control will appear differently when it has focus and when it doesnt have focus.
>>>
>>>So, single control panel setting change will stop many VFP programs
>>>working properly.
>>
>>Andrus,
>>
>>First, your date setting yy/dd/mm is not legal in VFP, at least in 5.0.
>
>My problem is that ANY user can change this setting at ANY TIME
>and this stops vfp from working properly.
>
>How I can dedect that some windows date formats are illegal to
>visual foxpro?
>Maybe using
>
>if ctod(dtoc(date())!=date()
> messagebox( 'Sorry boy, but your windows date format is not supported' )
> quit
> endif
>
>I need to use SET SYSFORMATS ON to allow users to select date
>different formats.

Yes Andrus, this is the sort of test you might do very early in your application and kick people out of it until they
have a decent date format. This is the first time I see a date in the format you displayed the other day.


José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform