SubSonic-3.0 icon indicating copy to clipboard operation
SubSonic-3.0 copied to clipboard

Conversion failed when converting date and/or time from character string. In SqlServer 2008

Open edgartaor opened this issue 13 years ago • 0 comments

When i use a datetime column, Subsonic create: ALTER TABLE [Posts] ADD [FechaPublicacion] datetime NOT NULL CONSTRAINT [DF_Posts_FechaPublicacion] DEFAULT ('01/01/1900 12:00:00 a.m.')

But this couse a error: Conversion failed when converting date and/or time from character string. This is because the datetime format must end in am/pm NOT a.m./p.m. (Note the dots) But, if i alter the table manually all works fine.

How can fix this?

edgartaor avatar Jan 08 '11 15:01 edgartaor