Displaying a date Short Format

I am Trying to show a date in a textbox with short format, i get the data from the database.

At presentation Time I want it to be shown with another Format Than this

dd/MM/YYYY HH:mm:ss AM/PM

How can I do it?

Where I want it to be shown:

TextBox1.DataBindings.Clear()
TextBox1.DataBindings.Add("Text", n.ADataSet, "Table.date")
Jon Skeet
people
quotationmark

Inside the database it has rhis format:

No, inside the database it will be stored in some binary format. Fundamentally, it's a date - it's not in any particular format, any more than a number is stored in decimal or hex... it's just a date.

When you fetch the value, you're getting a DateTime. Again, that's not got any particular format - it's just a date and time. You need to format it at presentation time.

If you look at the documentation for ControlBindingsCollection you'll see an example with custom formatting.

people

See more on this question at Stackoverflow