Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7688361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:54:09+00:00 2026-05-31T19:54:09+00:00

Inside a table, does any1 know how to select a specified row and take

  • 0

Inside a table, does any1 know how to select a specified row and take a Time data in a specified column, then put the data inside TimeSpan?

DataRow[] selectIDRow = RetailCamDataSet1.Tables["smBranchWorkingDayInfo"].Select("ID=" + ID);
foreach (DataRow row in getTimeDifference)
{
    TimeSpan startTime = new TimeSpan(); //Need to put the data into the bracket instead of using hard code

     TimeSpan endTime = new TimeSpan(20, 00, 00); //Hard coded
     TimeSpan timeDifference = new TimeSpan();

     timeDifference = endTime.Subtract(startTime);

     double minutes = timeDifference.TotalMinutes;

     normalCount = minutes / 15;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:54:10+00:00Added an answer on May 31, 2026 at 7:54 pm

    Have you tried TimeSpan.Parse()?

    DataRow[] selectIDRow = RetailCamDataSet1.Tables["smBranchWorkingDayInfo"].Select("ID=" + ID);
        foreach (DataRow row in getTimeDifference)
        {
             DateTime dateTime = DateTime.Parse(row["DateTimeColumn"].ToString());
             TimeSpan timeSpan = TimeSpan.Parse(dateTime.ToString("hh:mm:ss"));
             ... //do whatever you want to do with timeSpan
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to programmatically drop a column in a table inside of an
I have a drop down box for each row inside a table <table> <tr>
I am trying to figure out how to group data contained inside a Table.
I'm trying to make a SELECT where I need to select a specified table
the plugin http://thrivingkings.com/formly/ does not show the place text when inside a table td
How do I sort a column of Django elements inside a table? I notice
I am trying to update a column inside of a table variable based on
I have a table with various rows that display data, in each row I
Does this code contain anything invalid. I have a form with a table inside.
I'm trying to select all tr elements inside a table , except the third

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.