?
Solved

DateTime Picker

Posted on 2001-07-29
5
Medium Priority
?
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 800 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

743 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