We help IT Professionals succeed at work.
Get Started

VB.net DataGridView and Formatting date fields

2,914 Views
Last Modified: 2013-11-07
Hi
I have a gridview bound to XSD which has a DataTable with a date field called CaptureDateTime.
This is a Windows Form app.
The CaptureDateTime field is of type DateTime, but I can't get it to display time in the format dd/mm/yy hh:mm:ss.  It always displays dd/mm/yy hh:mm.  
The original data table field is showing data in dd/mm/yy hh:mm:ss when opening it.
Even when viewing data in XSD the DateTime field shows dd/mm/yy hh:mm with no seconds. Changing the DateTimeMode property of DataColumn in XSD has no effect on how its displayed in preview (I went through all the options).

Help please, thank-you - I need to display in this format.
Comment
Watch Question
IT Pro/Developer
CERTIFIED EXPERT
Top Expert 2008
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE