Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime to Date
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00653869
Message ID:
00654324
Views:
19
Well, then the issue is how to get the text box in your grid to only show the date portion of the datetime value that you are getting from SPT. If you can't format the grid column to do this (I'm not a grid expert) one thing that comes to mind is to maybe select the field twice, once in its "raw" format, and again by using CONVERT() to get only the date portion. Display the date portion in the grid, allow you user to update that grid column, and write the code to do a REPLACE on the "real" column with the datetime value as the user leaves that cell on the grid.

I'm surprised no one else has jumped in with any ideas here.

>I am showing resulting cursor after sqlexec() from SQL 7 in the grid. I make cursor updatable with CursorsetProp() etc...
>
>In the grid I get Datetime format what I have to change in Date format. If I set control for field with Todd() function I get date format, but control becomes read only. It is not possibile to change the date field in the grid.
>
>I have found the solution for Views - DbsetProp("MyView.Date","Field","Datatype","D") in the book SQL Server and VFP where you are one of the autors.
>
>If there is no so simple solution as for Views I am going to use Views instead SPT.
-Chuck Urwiler, MCSD, MCDBA
Previous
Reply
Map
View

Click here to load this message in the networking platform