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

When querying table TemporalTableBetween sql throws error non convertible datetime #766

Open
Ilkhom-S opened this issue May 30, 2023 · 10 comments
Assignees

Comments

@Ilkhom-S
Copy link

When use TemporalTableBetween extension. Datetimes can't converted to datetime2 in sql

Exception:

Microsoft.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting date and/or time from character string.

@JonathanMagnan JonathanMagnan self-assigned this May 30, 2023
@JonathanMagnan
Copy link
Member

Hello @Ilkhom-S ,

Thank you for contacting us, we will look at it.

Best Regards,

Jon


Sponsorship
Help us improve this library

Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function

@Ilkhom-S
Copy link
Author

@JonathanMagnan , I found that only when current context culture is other than en-us exception thrown. I tested with ru-RU , it's giving error
on en-US its ok.

@JonathanMagnan
Copy link
Member

Hello @Ilkhom-S ,

Do you think you could create a runnable project with the issue? It doesn’t need to be your project, just a new solution with the minimum code to reproduce the issue.

My developer told me that it worked when he did the culture test, so perharp we are missing something to reproduce it.

Best Regards,

Jon

@Ilkhom-S
Copy link
Author

Hello, I create sample project to demonstrate problem.
You need to apply migration and run console app to see problem

https://github.com/Ilkhom-S/ZZZThreadBug

@Ilkhom-S
Copy link
Author

Ilkhom-S commented May 31, 2023

I commented block where querying with ZZZ extension with default culture, because duplicate hook error was throwing.

@JonathanMagnan
Copy link
Member

Hello @Ilkhom-S ,

It's possible that the GitHub repos is private? We currently receive a Page not found when trying to go in your repository: https://github.com/Ilkhom-S/ZZZThreadBug

If you need to keep the code private, you can send it here: info@zzzprojects.com

Best Regards,

Jon

@Ilkhom-S
Copy link
Author

Ilkhom-S commented Jun 1, 2023

Apologize. I make it public

@JonathanMagnan
Copy link
Member

Hello @Ilkhom-S ,

Just to let you know that the issue has been fixed and should be released next week.

Best Regards,

Jon

@Ilkhom-S
Copy link
Author

Ilkhom-S commented Jun 7, 2023

Thanks,

@JonathanMagnan
Copy link
Member

Hello @Ilkhom-S ,

A new version has been released yesterday that should fix this issue.

If you have the chance to test it, let us know if everything has been fixed correctly.

Best Regards,

Jon


Are you finding this library useful? If so, please consider supporting its continued development by becoming a sponsor.

Additionally, if you think your enterprise would benefit from this library, we encourage you to suggest they become a sponsor as well. Your support will help ensure this library remains alive and well-supported.

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

No branches or pull requests

2 participants