General information
Category:
Forms & Form designer
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only