Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
calculate time difference
simon macharia
Jul 24 2016 1:07 PM
243
Reply
I'm try to us the following code
string timespent1 = "SELECT DATEDIFF(minute ,departureTime,entryTime) AS timespent FROM mambo where plateno = '" + TextBox1.Text + "'";
SqlCommand comman = new SqlCommand(timespent1, conn);
comman.Parameters.AddWithValue("@timespent", ToString());
comman.ExecuteNonQuery();
where departureTime is the departure time and entryTime is the entry time both in data type of
datetime
unfortunately is returnining a null value in the database.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
how to make marquee move the whole text
Web Configuration Tool in Visual Studio 2013