Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Could not find it in the Help
Message
De
21/04/2005 14:11:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01007154
Message ID:
01007164
Vues:
14
>I'm trying to find a correct format for strict datetime values, but I could not find it. Would you please check, if the following code creates this correctly?
>
>********************************************************************
>*  Description.......: TimeToStr - creates a date string from date
>*  Calling Samples...:
>*  Parameter List....: ttTime
>*  Created by........: Nadya Nosonovsky 07/13/2001 02:52:32 PM
>*  Modified by.......:
>********************************************************************
>function TimeToStr
>lparameter ttTime
>local lcReturn
>if empty(m.ttTime)
>	lcReturn='{}'
>else
>	lcReturn="{^" + (transform(ttoc(m.ttTime,1), "@R 9999/99/99 99:99:99")) + "}"
>endif
>return m.lcReturn


That would work but you are not validating the parameter to other than empty. It should validate to accept a DateTime parameter, else your TTOC() will fail.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform