473,385 Members | 1,562 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,385 software developers and data experts.

date time picker

Eva
Hi,

i am using a datetimepicker to select a date and i want
this value to be inputted into a listbox. The problem im
ahving is i get the date and the time appearing. I only
require the date. Is there a way around this?
Nov 22 '05 #1
1 1224
DateTimePicker' Value property holds actual DateTime value, while its Format
property determines how the DateTime value is displayed. You can also define
your own display format by using CustomFormat property.

In your case, now that you want to add DateTimePicker's value into a
ListBox, you simply do your own formating when add it to ListBox:

MyListBox.Items.Add(myDateTimePicker.Value.ToShort DateString());

"Eva" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Hi,

i am using a datetimepicker to select a date and i want
this value to be inputted into a listbox. The problem im
ahving is i get the date and the time appearing. I only
require the date. Is there a way around this?

Nov 22 '05 #2

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

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
13
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. ...
3
by: TD | last post by:
This code doesn't work. Every posting I can find suggests that it should. If TypeOf controlname Is DTPicker then do something here End If I am using the Date Time Picker control and wish to...
7
by: XmlAdoNewbie | last post by:
Hi All, I am wondering if it is possible to allow nulls or empty strings when it comes to the datetimepicker control. I have an app with a few datetimepickers on it and there are some instances...
2
by: Need Helps | last post by:
The example given in msdn.com on how to create a Date Time Picker involves using the CreateWindowEx function. However, I created a dialog box using the graphical interface, and then used the...
4
by: Michael Turner | last post by:
Hi Guys I have two DateTime pickers one shows the Date and the other the time, this is a requirement of the solution. The problem I have is that when the time is saved to the sql database into a...
2
by: Darhl Thomason | last post by:
I'm converting my Access 2003 VBA app. I have a number of date fields in my db that I want to use the date/time picker control with, but if there is no entry in my database, I want the date/time...
4
by: Michel Posseth [MCP] | last post by:
I have a problem with the date time picker validate event wich i believe is a bug How to reproduce : throw on a form a date time picker control and a textbox control select the validating...
0
by: fredloh | last post by:
i have a tab control on my form. i then have several microsoft date and time picker control on the tab control. when i select a date on any of the date and time picker control, the result of the...
1
by: Sabbuser | last post by:
Hey Guys please help me out!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I have placed a Date & Time Picker Control on a form in Windows 2000, When our Organization has upgraded all the PC's with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.