My textbox datatype is DateTime.

Using the click event of a button, this code is placed following MyTableBindingSourceAddNew()

Dim CurrentDateTime As DateTime = DateTime.Now.ToString("dd.MM.yy hh:mm:ss")
Me.SaleDateTextBox.Text = CurrentDateTime

I then update table with TableAdapter.

On my form I have a dropdown combobox in a toolbar, display member being "SaleDate"
This displays DateTime, but time is always 12:00:00AM
The SaleDateTextbox.Text populates as Date.Now.

I am not getting correct date and time in both textbox and combobox.

All help appreciated.

Shane.

Hi rproffitt. Thank you for your reply.
The ToString is irrelevant. If I display the variable CurrentDateTime in a MessageBox.Show, it returns correct DateTime.
However the field SaleDate does not populate with CurrentDateTime, only Date.Now. This is what I am not understanding.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.