locked
Convert 30202013 to 30/20/2013 RRS feed

  • Question

  • Hi

    Syntax Convert 30202013 to 30/20/2013  using C#.net .

    Monday, May 27, 2013 6:19 AM

Answers

  • What is 30/20/2013? This is wrong format. (There is no month like 20 or 30)

    However, you can convert similar string to DateTime object as below,

    DateTime dt = DateTime.ParseExact("30122013", "ddMMyyyy", null);

    Here I have assumied that the format of your input is ddMMyyyy.

    I hope this helps.


    Please mark this post as answer if it solved your problem. Happy Programming!

    Monday, May 27, 2013 6:33 AM