Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CTOT and Getting Wrong Time
Message
De
28/02/2008 07:44:31
 
 
À
27/02/2008 19:09:21
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01297205
Message ID:
01297316
Vues:
15
>I have this:
>
>
>ApptRules.EndTime = "02:45 PM"
>
>CTOT( "01/01/2000 : " + ApptRules.EndTime)
>
>
>The result is:
>
>
>01/01/2000 12:02:45 PM
>
>
>When I thought it would be:
>
>
>01/01/2000 02:45 PM
>
Jay,

I see you got the problem fixed, but just as a warning, I tend to stay away from CTOT() and CTOD() because the dates you pass in can be ambiguous. I would use the DATETIME() and DATE() functions instead. So your example would be this:
DATETIME(2000,1,1,14,45)
It would take a little bit more manipulation of your "02:45 PM" value, but it is safer coding incase someone is using a different date format.

HTH
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform