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. Time Zone and ParseDateTime

Time Zone and ParseDateTime

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++jsonhelpquestion
1 Posts 1 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.
  • M Offline
    M Offline
    Mike NET
    wrote on last edited by
    #1

    I tried using COleDateTime::ParseDateTime(...) and VarDateFromStr(...) to parse a date/time string that contains *time zone* information (ET, CT, +4:00, GMT+4:00, etc...) but every time I do so I get "Invalid DateTime" // code ////////////////////// COleDateTime dt; CString sdate = "Feb 1 2002 17:05 +7:00"; // <- Time Zone string date dt.ParseDateTime(sdate); CString st2 = dt.Format("%H:%M"); // <- returns 'Invalid DateTime' // ----------------------------- Is it just me (am I doing this wrong) or the ParseDateTime is no good for time zones? :confused: Is there any other way/method that could parse string with time zone information (like: "Feb 1 2002 17:05 +7:00"). JScript and VC#.NET have no problem parsing date/time strings with time zone info, but I can't seem to parse date/time string in VC++. :(( Platform: WinXP Pro, VC++.NET (unmanaged) Thanks in advance Mike

    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