Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set hours to 12|24
Message
De
13/09/2011 12:02:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Documentation de produit
Divers
Thread ID:
01523209
Message ID:
01523439
Vues:
40
J'aime (1)
>>>>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.
>>
>>The help file is inaccurate. TIME() returns a string value that is always 24-hour, so remains unaffected by the SET HOURS setting. As Sergey pointed out, DATETIME() returns a value that is independent of the format settings -- what *is* affected is the display format.
>
>I agree that Help could be more helpful here.

Interestingly enough, it turns out that the help file had the information we needed already (but it didn't help as we weren't looking in the right place)...

(From help on SET DATE)
> The SET DATE setting also determines how the date appears in datetime expressions.
>
> If DATE is set to SHORT or LONG, the SET CENTURY, SET MARK, SET HOURS, and SET SECONDS settings are ignored.
>
> SET DATE is scoped to the current data session.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform