I have a datetimepicker that displays only the date at design and runtime. However, in the datagirid it shows as date and time. I've had a troll round and it seems there's a lot of answers but nothing seems to work. I'd like to display only the date in the datagrid or just set the time to 00.00.
but when I run the app the datagrid column still returns dd/mm/yyyy, hh/mm
The app is for an angling club to record catch and release tags for conservation purposes and the time in the date column wouldn't make any sense to the user but the date is very important.
have you checked to see whats been passed to the datagrid?? (So that you know its the DateTimePicker that is passing this format : dd/mm/yyyy, hh/mm) just in case the gridview is doing something with it, and the problem lies there.
Good call, lets work out wots actually going wrong. Stick a break point on the code that passes the date to the GridView and see if its the correct format!
Whenever you bind data to a datagrid, you should be able to see whats being passed into each row by looking in something like the RowDataBound Event for the DataGrid...
ps. (I'm currently using ASP.NET so my knowledge is based around that)