Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Datetime data type
Message
From
10/04/2001 12:55:23
Jorge Haro
Independent Consultant
Juarez, Mexico
 
 
To
10/04/2001 09:04:59
Frank Cavone
Monetary Management of Ny, Inc.
Albany, New York, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00493782
Message ID:
00494072
Views:
17
You could just set the width of the textbox to something like 75, so the time part is not shown, but that's kind of cheesy, and you probably tried it already.

I'm also using SQL server but through ADO, so I'm not binding directly to a field. I pretty much couldn't get it to work with format or input mask, so I had to create a class for this case, the basic idea is:

In the refresh event/method of the textbox:
this.value = ttod( eval( this.cSource ) )
In the Lostfocus event/method
replace ( this.cSource ) with this.value
cSource is a custom property, which I use to store the name of the field I'm affecting, i.e. Orders.dCreated . You could use two properties, one for the table name and another for the field name so you can do something like:

replace (this.cField) with this.value in (this.ctable)

To keep replace from acting up because of the currently selected table or view.
Previous
Reply
Map
View

Click here to load this message in the networking platform