Solved

DateTime Picker

Posted on 2001-07-29
5
447 Views
Last Modified: 2008-02-01
Hi,

I'm using the Date/Time Picker control and I would like to eliminate the strange spacing that seems to occur in the display of the date.  I'm using the short date format as follows.

The date should display like this in the DTPicker:
1/7/01

But instead display's like this:
1 /7 /01

This forces the control to be larger than it should be, taking up extra space and it looks just plain goofy compared to the rest of the neatly formatted info in the window.

I've noticed that Microsoft seems to have avoided this problem in the Date section of the Find tool...As in Start -> Find -> File or Folders...It displays the short date just fine and without the goofy spacing.

Any ideas on how to get rid of the extra spaces would be appreciated.  Please note that I've tried using custom format with a M/d/yy variation without success.

Thanks,

Jim
0
Comment
Question by:syntel
5 Comments
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 200 total points
ID: 6333029
Hi syntel,

Try to set the CustomFormat Property in Data/Time Picker control.

Set the Format Property to 3 - dtpCustom,

then

Set the CustomFormat Property as dd/mm/yyyy

'Hope this will solve your problem, regards.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6333442
Neither the standard control nor the CCRP version of this control seem to have the ability to remove these spaces. Unless you choose a date format that fills the gaps such as suggested by ryancys (though this is more easily selected using  .Format = dtpShortDate) you have to live with the extra spacing.

I would either stick with the standard short date format (check what you have for this under control panel settings though) or go with CustomFormat = "dd/MM/yyyy"

0
 

Author Comment

by:syntel
ID: 6336313
Ineresting that Microsoft seems to get the control to work without the spacing.  I'd like to think there's another option.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7161657
Hi syntel,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept ryancys's comment(s) as an answer.

syntel, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7182450
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question