ASP.NET - How to check whether system date matched with a bound column in gridview
Asked By Harsha Reddy on 03-Jul-13 05:35 AM
Hello Experts,
I have a gridview consisting of columns like UserID,TaskID,ReminderDate,Task,TaskType,TaskStatus
How to check whether datetime in ReminderDate column is matched with system Date.
Please guide me.....
Hamit YILDIRIM replied to Harsha Reddy on 08-Jul-13 08:03 AM
Get its date part and look them if the date frequency is in the current scale +1 day > DateTime.Now >- 1 day (DateTime.Now.AddDays(-1))
This will give you 12pm to 12pm scale
If you dont want to use this you must look the time span when you get the current time as a TimeSpan
1- TimeSpan currTime = DateTime.Now; or .Time (i dont remember all)
2- Get you DB fields time as a TimeSpan
and compare them startTime <= currTime <= endTime