Resources » Code Snippets » ASP.NET WebForms

Select max and Min DateTime of a column in DataTable


Updated: Category: ASP.NET WebForms
Author: Member Level: GoldPoints: 2



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


Did you like this resource? Share it with your friends and show your love!

Responses to "Select max and Min DateTime of a column in DataTable"
Author: nRk  17 Sep 2009   Member Level: Silver   Points : 0
thanks...


Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Submit Article     Return to Article Index
    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John

    Online Members

    Priya jain
    More...
     
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India