Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert with a date
Message
 
To
31/05/2006 14:05:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01126253
Message ID:
01126255
Views:
19
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform