Convert a string to a datetime

后端 未结 5 904
鱼传尺愫
鱼传尺愫 2020-11-27 18:50

I am developing asp.net site using vb framework 3.5.

Im having difficulties converting string data into Date I tried using

5条回答
  •  甜味超标
    2020-11-27 19:25

    Try converting date like this:

        Dim expenddt as Date = Date.ParseExact(edate, "dd/mm/yyyy", 
    System.Globalization.DateTimeFormatInfo.InvariantInfo);
    

    Hope this helps.

提交回复
热议问题