Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Date to SQL DateTime
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01205160
Message ID:
01205468
Views:
19
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
Previous
Reply
Map
View

Click here to load this message in the networking platform