I have a dynamic BoundField (for a DetailsView) with the following code:
BoundField bf1 = new BoundField(); bf1.DataField = \"CreateDate\"; bf1.DataFormatStr
You could add dataformatstring="{0:M-dd-yyyy}" attribute to the bound field, like this:
dataformatstring="{0:M-dd-yyyy}
source: cant format datetime using dataformatstring