Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No easy way to get Date portion of DateTime field - Righ
Message
 
To
06/07/2001 11:20:38
Dan Denne
Caroselli Beachler McTiernan & Conboy
Pittsburgh, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00527483
Message ID:
00527497
Views:
16
You can tell a VFP remote view to return DateTime SQL fields as Date fields.

In the view designer, click on "Properties" button in Fields tab to do this.

Through code you can use something like:
DBSetProp('rv_yourview.yourdatetimefield', 'Field', 'DataType', "D")
> would it be easier to store the DATE and
> TIME in the SQL table as characters and
> use ctot() and ctod() to work with them
> in VFP once I have them in a cursor?
I wouldn't suggest that. You will need to write too much code to process dates/times that is already built-in in VFP and SQL Server.

I would think that substracting date and time portions of the fields once you have them in VFP will be good enough. Of course, your scenario may require something different.
Hector Correa
Previous
Reply
Map
View

Click here to load this message in the networking platform