Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Date to SQL DateTime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01205160
Message ID:
01205468
Vues:
16
Check http://www.foxite.com/archives/date-formatting-in-sql-server-2005-0000124624.htm (the whole thread there).

>Hi Sergey.
>I have now got all fields, apart from date fields , populating Sql server ok.
>When Inserting the Date field, I've used Dtoc() (the ? was giving an error)
>It creates the record succssfully for good source dates but the date ending up in Sql server table os 01/01/1900 12:00
>
>Any ideas ?
>
>Regards,
>gerard
>
>
>>If you use SPT parameters, VFP will do conversion for you
>>
>>ldDate = DATE()
>>lcSql = [INSERT INTO SqlTable VALUES (?ldDate)]
>>
>>
>>>I am converting a VFP table with date fields to a SQL server table with DateTime fields . (I am assumiong the DateTime field is the correct type of field ?)
>>>I am using the Insert SQLEXEC command... how do I convert the VFP date field to a SQL DateTime field ?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform