In Sql i have a string column which stores time value in mm:ss format. While writing LINQ to SQL query in C# I need to add that time value in date value which is another sql column.
To do that i will have to write
- DBFunction.AddHours(DateColumn,(double)TimeColumn.Substring(0,2)
but it gives complie time error.
I tried
DBFunction.AddHours(DateColumn,Convert.ToDouble(TimeColumn.Substring(0,2)) but it gives run time error as it is non supported method.
What is the solution if anyone can help.


Amit GuptaRank #190 · 12.8K reputationPosted Apr 8, 2021, 9:25 AM EDT
Ruchi SharavatRank #1,714 · 885 reputationPosted Apr 8, 2021, 11:09 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 8, 2021, 1:38 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 8, 2021, 1:39 PM EDT
Ruchi SharavatRank #1,714 · 885 reputationPosted Apr 8, 2021, 11:43 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 9, 2021, 1:23 AM EDT
Ruchi SharavatRank #1,714 · 885 reputationPosted Apr 9, 2021, 1:39 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 9, 2021, 1:59 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Apr 8, 2021, 10:00 AM EDT