locked
Customize Date RRS feed

  • Question

  • Dear All
    i am making one program in which i have to sort the data by date , i am stuck that in C# i got the date in

    using this code

     DateTime dateTime = DateTime.Now;
                Console.WriteLine("Day and Date = {0:D}", dateTime);
                // C.WriteLine("t = {0:t}", dateTime);
                Console.WriteLine("Time = {0:t}", dateTime);

    2/26/2010

    and in searching i am using this query getdate();
    which result this 2010-02-26 15:30:23.163

    i am stuck how to customize it , so the searching can made.
    Friday, February 26, 2010 10:34 AM

Answers