invalid date format in database synchronisation
cneyb
Posts: 5
:?:
I just upgraded to DATA COMPARE 7.0, but when I try to synchronize 2 tables in databases, SQL comes with an error : invalid CHAR to DATETIME conversion.
In version 7.0 dates are written in format '2008-08-18 ....' and in version 6, date are written '20080818 ....'
Is ther a way to change this,
thanks
I just upgraded to DATA COMPARE 7.0, but when I try to synchronize 2 tables in databases, SQL comes with an error : invalid CHAR to DATETIME conversion.
In version 7.0 dates are written in format '2008-08-18 ....' and in version 6, date are written '20080818 ....'
Is ther a way to change this,
thanks
Comments
You may be able to work around the issue for the time being by outputting the synch script and running it in your SQL Server sql editor. Making sure that you manually add SET LANGUAGE 'US_ENGLISH' before running the script.
SET LANGUAGE 'US_ENGLISH' worked so far - (but now i get different errors - will post em in a new topic)
I have too many problems with datetime format, I use Italian language, but I think it may resolve with change of the script, for example, from:
UPDATE [dbo].[aspnet_Membership]
SET [LastLoginDate]='2008-09-25 07:22:33.920'
WHERE [UserId]='1d6436d0-ac6d-4f1f-8cfc-a78308746c58'
to:
UPDATE [dbo].[aspnet_Membership]
SET [LastLoginDate]=CONVERT(datetime, '2008-09-25 07:22:33.920', 121)
WHERE [UserId]='1d6436d0-ac6d-4f1f-8cfc-a78308746c58'
If SQL Data Compare will write this script for me, I will continue without copy, modify and execute of script.
Thank you.
Redgate Software