Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
edgartaor opened this issue Jan 8, 2011 · 0 comments

Comments

@edgartaor
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant