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

  • Home
  • SEARCH
  • 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 6828683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:24:43+00:00 2026-05-26T22:24:43+00:00

I m trying to select a column’s value from a datatable based on conditions.

  • 0

I m trying to select a column’s value from a datatable based on conditions.

var results = from DataRow myRow in dtCallBack.AsEnumerable()
              where myRow.Field<DateTime>(1) == startDateTime
                 && myRow.Field<int>(0) == callBackID
              select myRow.Field<int>(3);

My datatable contains 4 columns ID,Date1,Date2,IntVal

I want to convert the variable results to int. (I want to return the column 4 IntVal)

  • 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-26T22:24:43+00:00Added an answer on May 26, 2026 at 10:24 pm
    var results = (from DataRow myRow in dtCallBack.AsEnumerable
                  where myRow.Field<DateTime>(1) == startDateTime 
                  && myRow.Field<int>(0) == callBackID
                  select myRow.Field<int>(3)).SingleOrDefault();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to select a column from a single table (no joins) and I
I am trying to have a running average column in the SELECT statement based
I'm trying to retrieve columns based on their corresponding key. Select * from diamond
Ok, so I'm trying to select an amount of rows from a column that
Im trying to select the title column from a particular row $eventid = $_GET['id'];
I’m trying to select various table and column names from a (SQL Server 2008)
I'm trying to select a substring of column, i.e. select substring(description, 1, 200) from
I am trying to select a column named YEAR from a table. I can
I'm trying to use SQL like select column from table where column in (?)
I'm trying to SELECT from two tables and ORDER BY date (a column they

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.