Using EF Core 5 and SQL Server, I am trying to figure how to convert a date stored as a string in LINQ query (so on SQL Server side).
I have searched in EF.Functions but I was unable to find the proper method for such date parsing.
I have also tried Convert.ToDateTime and DateTime.Parse, but they seem both to not have LINQ translations.
The direct SQL equivalent is Convert(datetime, mycolumn, 102).
I would be really surprised if Microsoft did nothing to support something as simple and easy to use in native SQL, so I'm sorry if I miss something obvious, but I have searched on the web and did a few attempts before to surrender.
PS : please note that I am aware of workarounds like calling ToList() before to apply Where(), or to modify the DB (or create a view) to change the column type.
My question is mainly : how to call with EF Convert(datetime, mycolumn, 102)
dateordatetimecolum in the first place?