473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ListBox problem

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

Apr 8 '06 #1
1 1126
variable.tostring("MM/dd/yyyy")

"thebison" <al************@btinternet.com> wrote in message
news:11**********************@t31g2000cwb.googlegr oups.com...
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

Apr 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Brian | last post by:
Hi, All, I'm using MS.net 2003 and using a windows.forms.listbox control for my window application but I don't know why the Horizontal Scrollbar could NOT be shown even if I set...
5
by: Bill | last post by:
I have have two list boxes. One is a listing of all possible variables. We'll call this listbox A. The other is a listing of all the selected variables. We'll call this listbox B. If a person...
1
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
9
by: zdrakec | last post by:
Hello all: Clearly, I'm not getting it! Here is the scenario: On a web page, I have two list boxen and a text box. The first listbox is populated at page load time (if it is not a postback)....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.