15,898,862 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 14089908 (Top 7 by date)
Member 14089908
6-Jan-20 0:44am
View
@Chritian thank you for your comment. As i already said, i am new to C# so please share the sample code if you have.
Thank you!
Member 14089908
9-Jun-19 13:29pm
View
Hello Richard,
Could you please give the sample code.
Thanks
Member 14089908
9-Jun-19 8:05am
View
You means i can do like this?
DataRow[] rows = table.Select("ShiftStartDateTime >=#"+d1+"#"+"AND ShiftEndDateTime <=#"+d2+"#");
Thanks
Member 14089908
8-Jun-19 13:33pm
View
I only have problem in the following code.
DataRow[] rows = table.Select("ShiftStartDateTime >=#"+d1.ToString("yyyy/MM/dd hh:mm:ss tt")+"#"+"AND ShiftEndDateTime <=#"+d2.ToString("yyyy/MM/dd hh:mm:ss tt")+"#");
Do you have any suggestion?
Member 14089908
24-Mar-19 3:33am
View
nice article, it solved my problem. Thanks
Member 14089908
14-Dec-18 22:48pm
View
Thanks RickZeeland for you time, i tried you solution but giving me an error. "Specified cast is not valid".
DateTime d = Convert.ToDateTime("4/12/2018 22:53");
IEnumerable<datarow> selectedRows = dt.AsEnumerable()
.Where(row => (row.Field<datetime>("Shift Start") >= d) && (d <= row.Field<datetime>("Shift End")));
foreach (DataRow row in selectedRows)
{
Console.WriteLine("{0}", row[0]);
}
Please help me out.
Thanks
Member 14089908
14-Dec-18 22:32pm
View
Thanks Richard for your time. Actually i want to search within Shift Start and Shift End please at table give bellow.
ID | Shift Start | Shift End
1 | 4/12/2018 7:00:00 AM | 4/12/2018 23:00:00 PM
Now i want get all the values within 4/12/2018 22:53 this date and time.
Thank you very much.
Show More