0

I Created a WebPart with a GridView.I get items of list and show in gridview.

Run-time ,datetime field displays only the time.

list.GetItems().GetDataTable();

1 Answer 1

1

You can set the DataFormatString property on your date BoundField:

boundField.DataFormatString = "{0:d}";

A similar question was asked on Stackoverflow.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.