Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert with a date
Message
De
31/05/2006 14:11:12
 
 
À
31/05/2006 14:05:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01126253
Message ID:
01126255
Vues:
21
>when i do and insert in a table i do it this way
>
>TEXT TO SQLCOMMAND NOSHOW PRETEXT 7
> INSERT INTO TB_ARINV (TR_ZEBRAINVID,TR_DUEDTE)
> VALUES (<>,'<>')
>ENDTEXT
>
>the arinv.duedte is a date. so if the date is 08/08/2006 it will be ok in the sql server but i will have 12:00:00 for the hours. there is a way to skip this part ???
TEXT TO SQLCOMMAND NOSHOW PRETEXT 7 TEXTMERGE
     INSERT INTO TB_ARINV (TR_ZEBRAINVID,TR_DUEDTE)
                   VALUES (<<ARINV.ZEBRAINVID>>,'<<DTOS(ARINV.DUEDTE)>>')
ENDTEXT
This is just to make sure your date is entered right. Aboud skiping Time part - no there is no way, SQL Server has no date type
But when you retreive data from SQL Server you could use Mapping for Views or CursorSchema for CA to map DateTime SQL Server fields to Date VFP Fields
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform