TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ruchi Sharavat
NA
959
600.8k
Conversion from string to int in LINQ to SQL query
Apr 8 2021 11:55 AM
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.
Reply
Answers (
9
)
How to construct an MongoDB Linq Any() query by comparing a sub-field
Fetch data from database with LINQ.