Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CDatetimepicker ctl formatting

CDatetimepicker ctl formatting

Scheduled Pinned Locked Moved C / C++ / MFC
questionregex
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ashman
    wrote on last edited by
    #1

    Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley

    M B 2 Replies Last reply
    0
    • A Ashman

      Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      Have a look at COleDateTime::Format[^] Michael But you know when the truth is told, That you can get what you want or you can just get old, Your're going to kick off before you even get halfway through. When will you realise... Vienna waits for you? - "The Stranger," Billy Joel

      1 Reply Last reply
      0
      • A Ashman

        Hi, I have written a reminders program which allows the user to input something they need reminding about with a date time picker so they can select the date and the time in which the popup should come up.... I need to input into a string the current system time with the same formatting as the control so that the time and dates will match with the times and dates selected by the user. How do I get the System Time in the same format as the CDateTimePicker control? Code examples would be appreciated or reference to an article. Thankyou, Ashley

        B Offline
        B Offline
        Branislav
        wrote on last edited by
        #3

        CDTPicker m_DateStart; // in header VARIANT tmpValue; int year; tmpValue = m_DateStart.GetYaer(); year = tmpValue.iVal; ------ SYSTEMTIME sysTime; ::SendMessage(m_DateStart.GetSafeHwnd(), MCM_GETCURSEL, 0, (LPARAM)&sysTime); year = sysTime.wYear; ------ ***************************************** http://www.thecodeproject.com/statusbar/activexstatbar.asp http://www.codeguru.com/Cpp/controls/controls/dateselectioncontrolsetc/article.php/c2229/

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups