Date and time picker customformat

Nuz

Board Regular
Joined
Aug 16, 2010
Messages
88
I'd like to switch between various date formats displayed on date and time picker control.
I'd like to display the month of the day as "written" according to country the user has selected. For example, the selected country is UK -> the date 31/12/2011 should be displayed as "31 December 2011". If the country is Norway, the date should show as "31 Desember 2011" and so on.

How can I define the customformat property to do this?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I actually figured this out with using the callback fields for custom formatting.

I just don't understand why the control doesn't align the date to left. My custom formatting is
Code:
"XXXX dd, yyyy"
and the array containing the months is defined as:
Code:
sEnglishMonths(0) = "January"
    sEnglishMonths(1) = "February"
    sEnglishMonths(2) = "March"
    sEnglishMonths(3) = "April"
    sEnglishMonths(4) = "May"
    sEnglishMonths(5) = "June"
    sEnglishMonths(6) = "July"
    sEnglishMonths(7) = "August"
    sEnglishMonths(8) = "September"
    sEnglishMonths(9) = "October"
    sEnglishMonths(10) = "November"
    sEnglishMonths(11) = "December"
Instead of having the date displayed nicely left-aligned as "December 31, 2011" the date is now full of blank spaces and very badly aligned:
08cb8


How can I adjust it?
C:%5CUsers%5CMarkus%5CDesktop%5Cdtp.png
 
Upvote 0

Forum statistics

Threads
1,214,529
Messages
6,120,070
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top