+ Reply to Thread
Results 1 to 15 of 15

Datepicker - Date format

  1. #1
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Datepicker - Date format

    Guys,

    I have been having problems with a sheet Ive been tinkering with for a couple of days, I was going round in circles but I just noticed that I have a problem with the datepicker on the userform.
    The date picker sends the date to a text box.. nothing complicated but I just noticed that for some really wierd reason the date picker changes format after the 12 of the month !!!
    As i click on dates upwards I get mm/dd/yyyy from 12/01/2019, 12/02/2019, 12/03/2019 ...........12/11/2019, 12/12/2019 but then I get 13/12/2019, 14/12/2019 it switches to dd/mm/yyyy.
    I change nothing at all just click one date to the next.... going up or back down it does the same.....

    Anyone seen this happening before ?

    Puzzled
    Steve
    Last edited by Steve6386; 12-25-2019 at 05:02 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Datepicker - Date format

    Which version of Excel are you using?

    Are you using a built in date picker or a custom built one?

    Beth.

  3. #3
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Hi beth, its office 2019

    It was built in MS monthview control 6.
    I can post a copy of the Workbook if it helps but wasnt sure if I should.

    Steve

  4. #4
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Datepicker - Date format

    It's usually helpful to have the file. Just make sure you desensitize any data before you post it.

    Can't promise I can help but have had this issue with date pickers in older versions so I'll happily take a look.

    Beth.

  5. #5
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Beth, thanks for the info.... I thought I was going nuts as I couldnt see how what I was seeing was possible .... nice to know someone else has had a simolar experience.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Beth,

    Its not a problem in the main project as the date is correct so the calculations and so on all work fine its just that the text box format changing could be confusing for end users of the project.

    Steve

  7. #7
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Datepicker - Date format

    I can't test it as I don't have that date picker installed on my machine. But try the below code. It's worked for me in the past.
    Please Login or Register  to view this content.
    Failing that, formatting as dd mmm yyyy rather than dd/mm/yyyy often helps too.

    Beth.

  8. #8
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Beth,

    I tried dd mmm yyyy, but just get a similar result.
    Choosing 2/12/2019 shows as 12/Feb/2019 3/12/2019 shows as 12/Mar/2019

  9. #9
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Datepicker - Date format

    As I mentioned, I cannot test as I do not have that date picker installed.

    I use a custom one (my brother built) in all my user form applications.

    Hopefully someone will pop along that can test it for you and resolve.

    Sorry I couldn't be more help.

    Beth.

  10. #10
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Beth,

    All sorted
    I changed the format on the datepicker sub

    Please Login or Register  to view this content.
    Steve

  11. #11
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Datepicker - Date format

    Quote Originally Posted by BanginMyHeadOnMyDesk View Post
    ... I can't test it as I don't have that date picker installed on my machine ...
    1. Download VB60SP6-KB2708437-x86-ENU.msi from:

    https://www.microsoft.com/en-us/down...s.aspx?id=7030

    2. Unzip to VB60SP6-KB2708437-x86-ENU folder (or with a different name)
    3. In above folder find mscomct2.ocx and copy this file to C:\Windows\System32
    4. Click 'Start' button
    5. In the 'Find' field type: cmd
    6. On the list that will appear move the mouse cursor over "cmd.exe"
    7. From the right key select "Run as administrator"
    8. Type (or paste => Top-Left corner => Edit\Paste): %systemroot%\System32\regsvr32.exe mscomct2.ocx
    9. Hit Enter
    10. Wait for the message

    Now you can use Microsoft Date and Time Picker Control

  12. #12
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Datepicker - Date format

    Quote Originally Posted by Steve6386 View Post
    ... All sorted
    I changed the format on the datepicker sub ...
    Does this mean that you solved your problem with unintentional date changes via vba code ?

  13. #13
    Registered User
    Join Date
    10-18-2008
    Location
    Scotland
    Posts
    39

    Re: Datepicker - Date format

    Porucha,

    I have the datepicker installed and it works as you can see from my earlier post.
    Are you suggesting that I replace my existing copy of mscomct2.ocx with the one from the link you posted ?

    Is it a newer version than the one I have and what improvements do you expect from it ?

    Steve

  14. #14
    Valued Forum Contributor
    Join Date
    06-02-2012
    Location
    London, England
    MS-Off Ver
    365
    Posts
    397

    Re: Datepicker - Date format

    I think porucha's post about installing the date picker may have been aimed at me after I said I didn't have the one you're using installed. Not an option for me as I'm using a company issued laptop and the IT Bods there won't allow me to install anything.

    The problem with using the inbuilt date pickers is if the file is to be distributed to multiple users then you need to ensure they ALL have that date picker installed. In my company some do and some don't. That is why I use a custom built one...

    Beth.

  15. #15
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Datepicker - Date format

    Quote Originally Posted by BanginMyHeadOnMyDesk View Post
    ... may have been aimed at me ...
    Yes, yes, yes ! ...

    Quote Originally Posted by BanginMyHeadOnMyDesk View Post
    ... the IT Bods there won't allow me to install anything ...
    ...

    For heaven's sake !
    This "ocx" is a "component" of the Office 'suite', it is not "foreign software", only package "add-ons", and "this" can be downloaded from the official Ms page ...


    Ps:
    "It's good that they don't give out chocolate bars that no one can absolutely eat, or cars that nobody can drive".

    2nd Ps:
    Funny that some in eu (and not only) say that it me (I ?), just until recently, lived in a system in which "everything was forbidden", ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 10-08-2019, 09:28 PM
  2. [SOLVED] Do a vlookup with a combobox on a datepicker's date with a range
    By JohnGreen2 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 11-17-2017, 07:08 AM
  3. Date Input using Datepicker for Multiple cells
    By jagguvaka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2015, 01:32 PM
  4. set datepicker value to current date on workbook open
    By whitwoo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-17-2014, 01:52 PM
  5. [SOLVED] Datepicker, textbox & cells date-format does not match for formula to work
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2014, 10:04 AM
  6. Adding Days to DatePicker date
    By passman86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2014, 07:11 AM
  7. [SOLVED] datepicker on 1904 date spreadsheet
    By Basil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2005, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1