How to work with dates in dd / mm / yyyy format in vb.net?

1

I have a text box named txt_cadastro.Text . By using the following command:

txt_cadastro.Text = DateString

My textbox is populated in the following format: 04-23-2014 What do I do to be presented in the Brazilian format dd/mm/yyyy , in the case: 23-04-2014 ?

I researched it and saw that I should change currentculture to the right format, but I could not do it!

Using the following command: txt_cadastro.Text = Format(DateString, "dd/MM/yyyy") the text box is filled with dd / MM / yyyy instead of 23-04-2014

Any simpler suggestion of date formatting?

    
asked by anonymous 23.04.2014 / 21:17

1 answer

2

If the idea is to show today's date, try:

txt_cadastro.Text = CDate(Now).ToString("dd/MM/yyyy")
    
23.04.2014 / 21:55