How to display only Date part of a datetime data that is bind to a gridview control?
Posted on 2014-12-25
Hi, I'm using vs2012.
I have to convert one of the gridview column to a templatefield instead of a bounfield because i need to add validation control to it. The regular expression validator is to make sure users enter correct date format during Editing mode. However, I lost the DataFormat in the property. I only want to display the date part. The regular expression I have configure also only validates Date. I also limit the max characters to be 10 in the Textbox. However, the data bind to the column is datetime type and upon page load, it displays date and time, mm/dd/yyyy hh:mm:ss
Is there a way to fix this? Thank you.