Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting datetime to date
Message
From
17/12/1998 12:55:11
 
 
To
17/12/1998 12:01:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00168548
Message ID:
00168577
Views:
34
Hi Ed, Denise

Denise (see you at the FUG in Jan?), an easy way to do this might be to use DBSETPROP() to change the DataType, for example:

DBSETPROP("datetimefield","FIELD",DataType,"D")

No mess, no fuss.


>>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!
>
>if you use data-bound textbox then TTOD() should be in Textbox.ControlSource. If it's unbound then the place is Textbox.Refresh method: This.Value=TTOD(...
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform