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 8511003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:51:57+00:00 2026-06-11T03:51:57+00:00

I have a datatable with 4 columns and one of them is smalldatetime type.

  • 0

I have a datatable with 4 columns and one of them is smalldatetime type. When I retrieve datatable from SQL base, I would like to query further through datatable, but only by a specific time. Is this possible?

I am tryin with something like this:

DataRow[] rows = dataset.Tables[0].Select("resStart = 'some date '" + myTime+"'");

and specifically I am trying to navigate through dates and times in datagrid so finally it dhould retreive one row by query like this

DataRow[] rows = dataset.Tables[0].Select("resStart = '" + myDate +" " + myTime+"'");
  • 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-06-11T03:51:59+00:00Added an answer on June 11, 2026 at 3:51 am

    If you want to query your data within your sourceCode DataTable class supports method SELECT which allows you to filter your table according to a given condition. Check out MSDN for a detailed explanation.

    string filterExpression = "YOUR_SMALLDATE_COLUMN > #1/1/00#";
    DataRow[] rows = YOUR_DATATABLE_VAR.Select(filterExpression);
    
    // eg. print out results - or rebind data etc.
    for(int i = 0; i < rows.Length; i ++)
    {
        Debug.WriteLine(rows[i]["ANY_COLUMN_NAME"]);
    }
    

    Of course, you may also change your select statement to the database and append a whereClause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp:datalist binding from table this table contain two columns one of them
I have one datatable. In that table I have columns named [Total Day], [Present
I have two simple interfaces. One accepts sql query the other is popup which
I have some DataGridViews each displaying one DataTable from a DataSet with multiple DataTables.
I have a datatable (.Net) with multiple columns. One of the columns say RollNo
I have One DataTable may have more Columns. But NetAmount, TotalAmount, Destination are the
I have one datatable which has four or five columns. I dont know exactly
I have one DataTable called DTStage. It has two columns such as SeqNbr and
I have a DataTable with 10 rows say one of the columns numbered 1
I have one sqlserver 2008 r2 datatable, it has one column autoId int identity(1,1),

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.