Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert - SQL For DateTime Data Type
Message
From
21/11/2001 06:54:23
 
 
To
21/11/2001 06:44:32
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00584335
Message ID:
00584381
Views:
49
>Hi Ed yungkie is talking about sqlserver no vfp in sql server you should use datetime as string so the insert will be like this:
>
>INSERT INTO my_Table (fld_character, fld_datetime) ;
>   VALUES ('this is a test','2001-11-21 04:26:00')
>
>

Then wouldn't he be couching this in a SQLEXEC()? If he's talking in terms of VFP - I had assumed he had an RV and wanted to know how to insert a DateTime in an RV - if he were asking about a pure T-SQL operation, then why ask in the VFP coding, syntax and commands area? It'd be marginal even in the Client/Server area.

>>>Dear all,
>>>
>>>I need help from all of you, 'cause right now i'm stuck with this problem;
>>>how can I insert a data to SQL Server, which this data type is DateTime, if
>>>the data type is character or numeric the syntax is like this :
>>>
>>>insert into my_table( fld_character, fld_numeric ) ;
>>> values ( 'testing data only', 123456789 )
>>>
>>>but how if the data type is DateTime ?
>>>
>>>before and after my many many thank's to you.
>>
>>The representation of a DateTime in a strict notation format is:
>>
>>{^yyyy-mm-dd,hh:MM:ss}
>>
>>Where:
>>
>>yyyy is the 4 digit year
>>mm is the two digit month
>>dd is the two digit date
>>hh is the two digit hour in 24 hour time notation (eg 1PM = 13)
>>MM is the two digit minute
>>ss is the two digit seconds
>>
>>So:
>>
>>
INSERT INTO my_Table (fld_character, fld_datetime) ;
>>   VALUES ('this is a test',{^2001-11-21,04:26:00})
>>
>>>
>>>regards,
>>>yungkie
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform