Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>I've got this data that's coming from an Access database so the dates are in datetime format.
>
>I only want to show the date on my form. I found the time to date function and it works beautifully in the command window. I type in ?ttod(fieldname) and it gives me the date and everything's beautiful.
>
>However, I've got a textbox on the form where I need to do this same thing. I've tried putting the =ttod(fieldname) in the value property of the textbox but no luck. I've tried putting =ttod(fieldname) in the input mask and putting an "R" in the format, but still no luck. Where can I put this function so that I only see the date on my form?
>
>Thanks!
Denise,
If you want to display date, and modify it, and then return date + original time, in vfp6 you can subclass textbox using value_assign and value_access methods (check out access and assign in the helpfile) in order to make the translation on-the-fly. The hardest part is finding out that you access these from the Class\Edit menu, and then use the checkboxes for access and assign after selecting the Value property. After that it becomes self-explanatory, with one reminder that .text returns the actual chars in the control, which can be handy in doing this sort of thing.
Hank
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement