|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ListBox ProblemI hope someone can help with this relatively simple problem. I am building a timesheet application using ASP.NET C# with Visual Studio 2003.As it is only a protoype application, my database has been made in MSDE. I've searched all over the web for the answer, but can't quite work it out. I am filling a list-box with Time Periods consisting of 'Start Date' and 'Finish Date' from a table, and have concatanated these into a new field, 'Full Date'. However when I DataBind the list-box it shows the format as '01/10/06 12:00:00 - 07/10/06 12:00:00'. I do not want the times to show. I know how to format one column, using the DataTextFormatString property, setting it to {0:d} , but I can't work out what it will need to be for my 'Full Date' field. The actual data expression for 'Full Date' is StartDate + '-' + FinishDate And I wish it to show in the ListBox as '01/10/06 - 07/10/06'. Anyone have any ideas on what I should put into DataTextFormatString to achieve this, so that the times are not included? Many Thanks! Al |
|||||||||||||||||||||||