TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shourya Verdhan
NA
88
56.1k
How to compare time from current time in C#
Apr 16 2013 2:30 PM
HI,
I am making a payroll software where i want to add a function for attendance where when a employee Login his time will save in Database but if Employee is 20 Mint. Late from their shift time it will automatic create Half Day. I added this code there.
private void btntimecheck_Click(object sender, EventArgs e)
{
if (System.DateTime.Now.Hour >= 10)
{
lbltimecheck.Text = "On Time";
}
else
{
lbltimecheck.Text = "Late";
}
}
in this code i can not compare minutes. like 10:20 i can compare only hours.
so please any one know its solution please give me that code.
Reply
Answers (
21
)
How to pass dynamic column name for excel sheet in c#?
Updating a Database using Data Grid