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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:25:34+00:00 2026-05-13T11:25:34+00:00

I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am

  • 0

I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am trying to use to filter based on a date. Column clock_in contains an ISO8601 formatted string. I would like to select all the rows in this DataTable/DefaultView between 2009-10-08T08:22:02Z and 2009-10-08T20:22:02Z.

What would I have to filter on this criteria? I tried:

TimeTableView = TimeTable.DefaultView;    
TimeTableView.RowFilter = "clock_in >= #2009-10-08T08:22:02Z# and #2009-10-08T20:22:02Z#";

This is not working for me. Am I operating on the wrong object or is my filter syntax wrong?

  • 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-13T11:25:34+00:00Added an answer on May 13, 2026 at 11:25 am

    In the end I solved it myself.

    To get a specific date:

    TimeTableView = TimeTable.DefaultView;
    TimeTableView.RowFilter = String.Format("CONVERT(clock_in, System.DateTime) = #{0}#", dayToFilter.ToShortDateString());
    

    To get a range of dates (where A and B are DateTime objects):

    TimeTableView = TimeTable.DefaultView;
    TimeTableView.RowFilter = String.Format("CONVERT(clock_in, System.DateTime) >= #{0}# AND CONVERT(clock_in, System.DateTime) <= #{1}#", A.ToShortDateString(), B.ToShortDateString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ComboBox with its DataSource set to an instance of a DataTable.
I have a datatable with data in it (customer addresses). In some instances, column
I have datatable with column name tag and 100 rows of data.I need to
I have a datatable with user information and a column called 'Bits'. There is
I have a DataTable that has a string type column filled with valid numeric
I have a DataTable that has a boolean column called [Invalid]. I need to
I have a Datatable in my C# program that I would like to INSERT
I have a DataTable MyDT like below: string MyConString = SERVER= + sConfig_hostname +
I have a datatable which contains yearly data saved. e.g. dtDate Value 2010-01-01 00:00:00.000
I have a datatable where I want to change the color of a cell

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.