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. CDateTimeCtrl

CDateTimeCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 4 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.
  • G Offline
    G Offline
    ganesh_IT
    wrote on last edited by
    #1

    Hi Guys, I am using CDateTimeCtrl in my project.I dont know how to get Date, Month and Year Separatly. If you Know explain me with simple code Thanks in Advance

    _ S C 3 Replies Last reply
    0
    • G ganesh_IT

      Hi Guys, I am using CDateTimeCtrl in my project.I dont know how to get Date, Month and Year Separatly. If you Know explain me with simple code Thanks in Advance

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      How about reading the documentation in MSDN and letting us know what you did not understand after seeing the member functions of this class to get the date, month and year separately? Read GetTime function and refer the SYSTEMTIME structure.

      I am a HUMAN. I have that keyword (??? too much) in my name........ ;-)_AnsHUMAN_b>

      1 Reply Last reply
      0
      • G ganesh_IT

        Hi Guys, I am using CDateTimeCtrl in my project.I dont know how to get Date, Month and Year Separatly. If you Know explain me with simple code Thanks in Advance

        S Offline
        S Offline
        Sameerkumar Namdeo
        wrote on last edited by
        #3

        http://www.codeproject.com/Messages/3621623/date-comparison.aspx[^]

        My Blog.
        My codeproject Articles.

        1 Reply Last reply
        0
        • G ganesh_IT

          Hi Guys, I am using CDateTimeCtrl in my project.I dont know how to get Date, Month and Year Separatly. If you Know explain me with simple code Thanks in Advance

          C Offline
          C Offline
          cccfff777
          wrote on last edited by
          #4

          Use the method "GetTime" and then Format the CTime-object. Example to get the month: CTime timeTime; theDateTimeCtrl.GetTime(timeTime); CString strMonth(timeTime.Format(_T("%m")); Now the Month is in the string. Look in the documentation of strftime to get the formatting codes.

          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