Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set hours to 12|24
Message
De
12/09/2011 15:32:01
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Documentation de produit
Divers
Thread ID:
01523209
Message ID:
01523308
Vues:
28
>>>>You are confusing a value returned by datetime() function with what is dispalyed
>>>>
>>>>>
>>>>>I agree with Naomi, the Helpfile says explicit the value returned by DATETIME( ) is determined by the current SET HOURS setting. More important how can I get a 12 hour notation or am I forced to make a function?
>>>>>
>>>
>>>The Help file is confusing:
>>>
>>>Use SET HOURS TO without 12 or 24 to return to the default 12-hour format.
>>>
>>>TIME( ) always returns a value in 24-hour format and isn't affected by SET HOURS. The value returned by DATETIME( ) is determined by the current SET HOURS setting.
>>>
>>>SET HOURS is scoped to the current data session.
>>>----------------------------------------------------------------------------
>>>In my tests I got the same output for ? DATETIME() regardless on the current SET HOURS settings.
>>
>>Hrm... I wonder if there's a setting somewhere that tells VFP to use the locale settings instead of the VFP-specific settings?
>>
>>One thing that I've noticed in the help file -- much of it assumes locale is the USA.
>
>By later experiments I found that if I have SET DATE LONG or SET DATE SHORT or SET DATE DMY / MDY / YMD
>
>then the SET HOURS settings are ignored. If I use SET DATE USA (or any other setting), then SET HOURS are respected by the displayed value.

It does make sense for SET DATE LONG and SET DATE SHORT as it specifies it uses the formats as configured in the control panel (implying it reads the locale information). However, I don't think the SET DATE DMY/MDY/YMD will behave the same (did quick experiement and noticed that SET DATE DMY/MDY/YMD does seem to honor the SET HOURS setting. It could've been a "side effect" of using SET DATE LONG or SET DATE SHORT that you might've observed).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform