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. Problem with COleDateTime

Problem with COleDateTime

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionworkspace
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.
  • P Offline
    P Offline
    PravinSingh
    wrote on last edited by
    #1

    Hi, I want to convert a CString to COleDateTime. I'm using COleDateTime::ParseDateTime()and passing it the string as _T("1/25/1996 8:30:00") which is a valid format acc. to MSDN. But still, it is not working. Does anyone have any idea of what could be wrong or what setting do I need to change in my workspace (or on my system) to use COleDateTime properly? Regards, Pravin

    C 1 Reply Last reply
    0
    • P PravinSingh

      Hi, I want to convert a CString to COleDateTime. I'm using COleDateTime::ParseDateTime()and passing it the string as _T("1/25/1996 8:30:00") which is a valid format acc. to MSDN. But still, it is not working. Does anyone have any idea of what could be wrong or what setting do I need to change in my workspace (or on my system) to use COleDateTime properly? Regards, Pravin

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Are you sure the regional settings for the date on your computer are set to 'MM/dd/yyyy' (or somethoing like that ;P)?? This may be the source of the problem...

      D 1 Reply Last reply
      0
      • C Cedric Moonen

        Are you sure the regional settings for the date on your computer are set to 'MM/dd/yyyy' (or somethoing like that ;P)?? This may be the source of the problem...

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        From my testing, ParseDateTime() does not care about the regional settings. I use dd-MMM-yyyy H:mm for mine and I can pass a dozen different formats to ParseDateTime() all yielding correct results.


        "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

        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