Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing datetime type to date type
Message
From
20/09/2007 10:06:03
 
 
To
20/09/2007 09:57:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01255721
Message ID:
01255723
Views:
22
>when i send data from sqlserver to vfp all dates fields become datetime. i want them to be date type.
>is it possible change the type of a field by code whithout showing the table designer ?

If you use RV you could click on Field in View designer then Map DateTime field to Date field.
If you use CAs you could use CursorSchema property to map that field to Date one.
If you use SPT, no easy way. You could get the result set from SQL Server and then run new select:
SQLEXEC(...,...,[crsTemp])
SELECT ...,
       TTOD(MyDateTimeField) AS MyDateTimeField;
FROM crsTemp;
INTO CURSOR RealCursorName
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform