Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which control to use for a datetime field?
Message
 
À
21/03/2000 12:22:14
Gerald McKinsey
Keystone Consulting Services, Inc.
Yorktown, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00348461
Message ID:
00350508
Vues:
29
Brian,

The error message is datatype validation in the Init() of the MM class. You can subclass the control, then override the Init() so that it accepts DateTime values as well as Dates.

If your users frequently key in Date/Time values, you might consider building in some shortcuts to make data entry less tedious. Check out the KeyPress() method in the datetextbox class. The keystrokes in there mimic Quicken.

With datetimes, if your users are frequently entering the date and hour, but not minutes and seconds, you might create KeyPress() code that allows easy increment/decrement on the hour portion, with or without adjusting the minutes/seconds to 00:00.

Coming at it from another direction, if you are using views and want to display the date portion of a datetime column, you can set the columns' properties in the View Designer or with DBGETPROP(). In View Designer, click Properties button on Fields tab. Use the listbox on top to select the field, then under Data Mapping change DateTime to Date.

I saw that your question was a few days old with no response, so I thought I'd give it a shot. Hope this helps.


>Hello everyone,
>
>What control should I use to display a datetime field? I am trying to use one of the dateboxes in kcontrls or kcustctl and it gives me an error basically saying since it is not a date value I can't use it. Any suggestions?
>
>Brian
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein

Bruce Allen
NTX Data
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform