>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