Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No easy way to get Date portion of DateTime field - Righ
Message
 
À
06/07/2001 11:20:38
Dan Denne
Caroselli Beachler McTiernan & Conboy
Pittsburgh, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00527483
Message ID:
00527497
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform