+ Reply to Thread
Results 1 to 13 of 13

DateTime picker is not include hours

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    DateTime picker is not include hours

    hi
    am trying to use DateTime picker in excel 2007 but it's only show mm/dd/yyyy......without hours 00:00
    how can we add hours to DateTime picker ? if it's possible

    p.s: i dont know if this is the right section to post my thread or i should post it in VB section ...
    sorry
    Last edited by abdi1; 05-24-2021 at 10:00 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-24-2020
    Location
    Woodbridge, VA
    MS-Off Ver
    2016
    Posts
    434

    Re: DateTime picker is not include hours

    Hi - can you please attach your file so we can take a look? See yellow banner on top on how to include it.

  3. #3
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    Quote Originally Posted by mikeava;5520e421
    Hi - can you please attach your file so we can take a look? See yellow banner on top on how to include it.
    hi and thanks....i tray to use the (Microsoft date and time picker control) in excel for quick and easy inserting of date and time in the sheet...but i discovered that this control contain only mm/dd/yyyy variables without hh:mm although this control is called(date and time picker )but it's not include hourly time ....my question is that (can we format this control to show or add HH:MM to it? its a known control for many...and i think no need to attach an excel sheet.....
    thanks

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,446

    Re: DateTime picker is not include hours

    Hi abdi1,

    It looks like you need to set the ShowUpDown property as explained on this site, and set the format correctly.
    https://docs.microsoft.com/en-us/dot...r?view=net-5.0
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    MarvinP thanks for you.......but it seem that the link above is talking about C# programming language.....i dont know how to deal with this language
    was looking for the answer in excel
    thanks
    Last edited by AliGW; 05-23-2021 at 10:36 AM. Reason: PLEASE don't quote unnecessarily!

  6. #6
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    Quote Originally Posted by mikeava View Post
    Hi - can you please attach your file so we can take a look? See yellow banner on top on how to include it.
    a picture worth a 1000 word.s...
    Attached Images Attached Images
    Last edited by abdi1; 05-23-2021 at 10:42 AM.

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: DateTime picker is not include hours

    a workbook is worth a thousand pictures and would probably get you an instant answer without wasting time.
    torachan.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,446

    Re: DateTime picker is not include hours

    Hi,

    If you click on the object and look at the properties window of that control, you should see that you can set it. If not in the control then look at the object browser to see if the correct word is displayed for you to set using VBA.
    I don't have that control to test it, for a better answer.

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,446

    Re: DateTime picker is not include hours

    Instead of using the DTPicker that is now dead, see if you can use the attached example that I've collected from years on this site.
    Self-contained calendar control.xlsm

  10. #10
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    Quote Originally Posted by MarvinP View Post
    Instead of using the DTPicker that is now dead, see if you can use the attached example that I've collected from years on this site.
    Attachment 733762
    MarvinP thanks for your help.....i will tray to use your file to fit with my requirements in my sheet
    thanks for you ....appreciate

  11. #11
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    hi
    i think i found the solution using the Date and time picker it self
    after adding the Date and time picker control as usual
    and before click on Design mode to activate the control and use it
    we need to right click on it(i mean the date and time control which is on the excel sheet )
    and choose DTpicker object ,,,, then choose properties and from the pop up windows go to format option and choose 3-dtpCustom....then check the UpDown box near it ....then on the last choice (CustomFormat ) we can iserte the date time format that we prefer like( m/dd/yyyy hh:mm)
    and click ok....and that it's all
    Last edited by abdi1; 05-23-2021 at 04:18 PM.

  12. #12
    Registered User
    Join Date
    08-19-2010
    Location
    jersey
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: DateTime picker is not include hours

    Quote Originally Posted by torachan View Post
    a workbook is worth a thousand pictures and would probably get you an instant answer without wasting time.
    torachan.
    sorry ....i didnt notice your reply.until today morrning ..thanks very much next times i will insert a workbook but i thought my request is easy to be solved without the need of a workbook
    big thanks and the problem SOLVED

  13. #13
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: DateTime picker is not include hours

    Here is another approach.
    It will follow the table, you must have an entry in the first column, double click the second column.
    Click in the hours or mins to set then choose date.
    Attached Files Attached Files

+ 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. Count If Start Datetime and End Datetime is less than 30 seconds
    By crappygeezer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-23-2017, 07:48 AM
  2. Replies: 8
    Last Post: 01-31-2016, 10:14 AM
  3. Calculate days using DateTime Picker excluding weekends and dispaly dates column wise
    By bhuvana86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2015, 02:10 PM
  4. calculate 2 datetime and returning to days and hours
    By remie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-01-2014, 10:29 AM
  5. NonActiveX DateTime Picker: Conpile error in hidden module
    By vbarookie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2011, 08:49 PM
  6. Based on a Column datetime value auto calculate and populate a datetime range
    By rajashanmuga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2010, 04:10 PM
  7. DateTime picker control
    By MVM in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-30-2006, 09:10 AM

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