I Have a datatable in which itwo column Datetime and userid.
I have to get maxtime and min thime with where condition date and userid in C#
I am using this query
DateTime OutDateTime = Convert.ToDateTime(record.Compute("MAX(DateTime)", "UserId='" + enrNo + "' and Tdate='" + DateTimee + "'")); DateTime InDateTime = Convert.ToDateTime(record.Compute("MIN(Tdate)", "UserId='" + enrNo + "' and Tdate='" + DateTimee + "'"));
Please help me


Amit GuptaRank #190 · 12.8K reputationPosted Oct 9, 2020, 2:01 AM EDT
Jignesh KumarRank #91 · 22.9K reputationPosted Oct 9, 2020, 5:06 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Oct 9, 2020, 5:36 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Oct 9, 2020, 5:10 AM EDT