Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying SQL datetime value's date portion in a grid
Message
From
29/04/2003 08:09:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00782497
Message ID:
00782617
Views:
10
>I apologize since I know this has been answered before (most probably by Sergey ;) ), but I forgot to file it in my tips folder.
>
>I'm retrieving SQL Server data using SPT to a cursor which contains, among other things, a datetime field. I have a textbox control in a grid that I would like to use for displaying this field as a date only. How do I achieve this? Changing the SELECT statement to convert the datetime field to a style of 101 doesn't help at all. Am I to use TTOD() somewhere in this?
>
>Laterness,
>Jon

If for display only then simply set controlsource to '(ttod(alias.fieldname))'
In VFP8 you could use CursorAdapter.CursorSchema to set the datatype as date.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform