Practically yes that's the only way I know of when I need to insert a date w/o thinking current set date.
OTOH having set date in 'dbc_BeforeOpenTable' works.
Cetin
Kevin what's wrong with sending strictdate format. It's safe. If you have dates as variables (ie: ldDate1, ldDate2) then something like this would convert to needed format :
'Insert into myTable (...) values (..., {' +;
trans(dtoc(ldDate1,1),'@R ^9999/99/99')+'},...)'
>Thanks Cetin
>
>Is that the only way you know of, it seems quite strange to me as I'm sure I've never had this problem before.
>
>Kev
>
>>>Hi
>>>
>>>When I pass an INSERT-SQL like "INSERT INTO Table (DateField) VALUES ({15/01/2003})" via ADO Connection, VFP always places the date into the table as an American style format.
>>>
>>>I have SET DATE TO British set via the DBC OpenData event, what else can I do?
>>>
>>>Thanks
>>>Kev
>>
>>Kevin,
>>Use strictdate format :
>>"INSERT INTO Table (DateField) VALUES ({^2003/01/15})"
>>Cetin