ListBox problem

T

thebison

Hi all,

I 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top