Display date in dd/mm/yyyy format in vb.net

后端 未结 7 1882
独厮守ぢ
独厮守ぢ 2021-01-11 11:08

I want to display date in 09/07/2013 format instead of 09-jul-13.

Dim dt As Date = Date.Today

MsgBox(dt)
7条回答
  •  抹茶落季
    2021-01-11 11:59

    Try this.

     var dateAsString = DateTime.Now.ToString("dd/MM/yyyy");
    // dateAsString = "09/07/2013"
    

    and also check this link for more formatting data and time

提交回复
热议问题