Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show only Date in form from a Datetime field
Message
 
À
15/03/2003 16:17:49
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00766210
Message ID:
00767153
Vues:
39
If I have a form that has control bound to a datetime field in a cursor, but I want to display/edit only the date portion, I create a new form property that has access and assign methods. In this access method, it reads the value of the datetime field and converts it with TTOD(). If the value in the datetime field is null (remember that SQL Server does not allow "empty" dates), I then simply convert it to an empty date. Now, on the assign method, I simply take the property's value and replace it into the cursor's field, after I convert it with DTOT(). If the property's value is an empty date, I replace a null value into the cursor's field. Finally, on the form, I set the control's ControlSource property to this new form's property (ie. thisform.dbirthdate) instead of the cursor's field. Works great and the user sees and edits just the date portion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform