tjrobinson.net

Home

❯

Conversion failed when converting date and or time from character string

Conversion failed when converting date and or time from character string

Jul 07, 20261 min read

  • sql-server
SELECT COUNT(*)
FROM [vwTasks] AS [item]
WHERE ((([item].[Deadline] < '2019-04-15T00:00:00.0000000')

Conversion failed when converting date and/or time from character string

This can happen when Entity Framework Core generates datetime2-style literals for a column that is datetime.

  • EF Core 2.0: default all date fields to use datetime2 — Stack Overflow
  • Data types — EF Core relational modelling docs

See also

  • SQL Server

Related bookmarks (6)

  • Jerry Nixon on SQL Server Extension for VS Code [EPISODE 857]youtube.com · Jul 18, 2025
  • Turn your .NET CLI tool into a local MCP Server for use with GitHub Copilot in VS Codeerikej.github.io · May 14, 2025
  • Packaging Permissions in Stored Proceduressommarskog.se · Feb 28, 2025
  • Introducing MSBuild.Sdk.SqlProj 3.0 - create, build, validate, analyze, pack and deploy SQL database projects with .NET 9erikej.github.io · Jan 24, 2025
  • Deploying .dapacs to Azure SQL via Azure DevOps Pipelinestechcommunity.microsoft.com · Sep 30, 2024
  • Migrating an Azure SQL DB to a SQL MI by utilizing SqlPackage/ADFtechcommunity.microsoft.com · May 11, 2024

Graph View

  • Conversion failed when converting date and/or time from character string
  • See also

Backlinks

  • SQL Server