Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time Fields
Message
De
12/03/2006 22:57:18
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
12/03/2006 21:00:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01103567
Message ID:
01103605
Vues:
19
Hi,
I think you should use a DateTime field, as you are doing, for the TimeIn and TimeOut fields. However, if you want the form to show only the time, you need to format that yourself. In other words, don't bind the value you show to the TimeIn field, at least not directly.
I am suggesting you would not specify a ControlSource for the textbox that shows and allows entry for TimeIn. In the Refresh() you must put code that shows the text that you want.
PROCEDURE Refresh()
This.Value = SUBSTR(TTOC(TimeIn),10)
In the Valid() you will need to insure that a valid time has been entered, and there you can parse it and save it--REPLACE TimeIn WITH (DATETIME(nYear,nMonth,nDay,nHours,nMinutes,nSeconds)). There you must determine with what date to prefix the time. If the date is unsure, you need a way for the user to specify it.
Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform