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#
  4. DateFormat

DateFormat

Scheduled Pinned Locked Moved C#
3 Posts 2 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.
  • J Offline
    J Offline
    James McCutcheon
    wrote on last edited by
    #1

    I want to read a date string from a log file it is in this format ... 17/Apr/2003:06:40:39 +1000 I would like to parse this then display it as the local time format. I am lost in the world of Globalization James McCutcheon

    J 1 Reply Last reply
    0
    • J James McCutcheon

      I want to read a date string from a log file it is in this format ... 17/Apr/2003:06:40:39 +1000 I would like to parse this then display it as the local time format. I am lost in the world of Globalization James McCutcheon

      J Offline
      J Offline
      James McCutcheon
      wrote on last edited by
      #2

      Found my own solution ... in case anybody else wants to know: activitytime = "01/Apr/2003:11:01:02 +1000"; DateTime dt = DateTime.ParseExact(activitytime, "dd/MMM/yyyy:HH:mm:ss zzz", new System.Globalization.DateTimeFormatInfo());

      J 1 Reply Last reply
      0
      • J James McCutcheon

        Found my own solution ... in case anybody else wants to know: activitytime = "01/Apr/2003:11:01:02 +1000"; DateTime dt = DateTime.ParseExact(activitytime, "dd/MMM/yyyy:HH:mm:ss zzz", new System.Globalization.DateTimeFormatInfo());

        J Offline
        J Offline
        J Dunlap
        wrote on last edited by
        #3

        James McCutcheon wrote: Found my own solution ... in case anybody else wants to know: I always appreciate people posting their solutions if they find them. Then if someone else with the same problem comes across the same problem and finds your post, they can know the solution, too. :)

        "Do unto others as you would have them do unto you." - Jesus
        "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

        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