Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Time
Divers
Thread ID:
00575377
Message ID:
00576222
Vues:
24
>>>>>If I have a value of 72600, which represents the number of seconds elapsed since midnight, which also happens to be 08:10 pm, how do I convert that into a string that says simply 08:10 pm? Getting the hours is easy, it's the minutes I'm having a problem with. I think I'm going brain dead.
>>>>
>>>>See Message #482883.
>>>
>>>It's close. It should give me some ideas of how to get to what I want. Thanks.
>>
>>James,
>>
>>Try:
>>
>>TTOC(DATETIME(1900, 1, 1, 0, 0, 0) + 72600, 2)
>>
>>
>>Cheers,
>>
>>Andrew
>
>
>correction :~0
>
? AllTrim(STR(IIF(INT(Val(sys(2))/3600)> 12,INT(Val(sys(2))/3600)-12,INT(Val(sys(2))/3600))))+":"+AllTrim(STR(INT((Val(sys(2))-INT(Val(sys(2))/3600)*3600)/60)))+"."+AllTrim(STR(INT(Val(sys(2)) % 6)))+IIF(INT(Val(sys(2))/3600)> 12," pm"," am")
Edgar L. Bolton, B.S. B.B.A.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform