Select max and Min DateTime of a column in DataTable

To Select the Max and Min you can use this code.

DateTime StartTime = Convert.ToDateTime((dt.Compute("min(StartDate)", string.Empty)));

DateTime EndTime = Convert.ToDateTime((dt.Compute("max(EndDate)", string.Empty)));

Happy Coding


Comments

Author: nRk17 Sep 2009 Member Level: Silver   Points : 0

thanks...