Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dates with MS SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00622932
Message ID:
00623028
Views:
25
Hi!

When you use views, in the view designer open fied properties dialog box, select the date field in combobox and then change type for that field from datetime to date. VFP will automatically convert all datetime fields to date fields when downloading data from SQL Server.

For SQL Pass-Through or for ADO you will have to do this on the interface level, unfortunately. Just do not bind textbox to the field, but in textbox's Refresh method read the value directly by code and convert it to date, then in the Valid event store changed value back to the field.

HTH.

>I was just wondering how people display date values using SQL Server. As you may know there is no date data type with sql server, just datetime.
>
>I want to display a date in a control that is bound to the table. How can I get the textbox to just show the date part, not the whole date and time? I tried using date(table.datefield) in the control source but that dosent work. How do you guys handle this issue?
>
>TIA
>Eric Stephani
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform