Date in a Textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to have the system Date in a textbox every time I start my program,
"Today Date: ??/??/???? (M/D/Y)", so that I may be able to save data with
that date.

Thanks,

Dooglo
 
I'd like to have the system Date in a textbox every time I start my program,
"Today Date: ??/??/???? (M/D/Y)", so that I may be able to save data with
that date.

Thanks,

Dooglo

Private Sub MyForm_Load (.......)....
myTextBox.Text = DateTime.Now.ToString ("MM/dd/yyyy")

End Sub
 
* Tom Shelton said:
Private Sub MyForm_Load (.......)....
myTextBox.Text = DateTime.Now.ToString ("MM/dd/yyyy")

.... if you don't want locale-aware date separators:

\\\
.... = DateTime.Now.ToString("MM\/dd\/yyyy")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top