Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting datetime to date
Message
From
19/12/1998 05:46:48
 
 
To
17/12/1998 11:56:40
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00168548
Message ID:
00169092
Views:
22
>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
Map
View

Click here to load this message in the networking platform