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. The Lounge
  3. Dates are wonderful

Dates are wonderful

Scheduled Pinned Locked Moved The Lounge
25 Posts 17 Posters 27 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.
  • T tumbledDown2earth

    Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #15

    tumbledDown2earth wrote:

    Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

    As an unformatted Double, it's beauty. It's the localized representations that suck.

    Console.WriteLine("Posted on star-date: {0}", DateTime.Now.ToOADate());
    Posted on star-date: 41386,8388463889

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

    D B 2 Replies Last reply
    0
    • L Lost User

      tumbledDown2earth wrote:

      Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

      As an unformatted Double, it's beauty. It's the localized representations that suck.

      Console.WriteLine("Posted on star-date: {0}", DateTime.Now.ToOADate());
      Posted on star-date: 41386,8388463889

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      D Offline
      D Offline
      dusty_dex
      wrote on last edited by
      #16

      > "It's the localized representations that suck." That and daylight savings. X|

      "It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.

      1 Reply Last reply
      0
      • T Thomas Daniels

        yyyy/MM/dd hh:mm:ss That's how I format it.

        The quick red ProgramFOX jumps right over the Lazy<Dog>. My latest article: Understand how bitwise operators work (C# and VB.NET examples) My group: C# Programmers Group

        H Offline
        H Offline
        H Brydon
        wrote on last edited by
        #17

        That is called comparison time format or (almost) ISO 8601[^].

        -- Harvey

        J 1 Reply Last reply
        0
        • T tumbledDown2earth

          Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

          M Offline
          M Offline
          Mladen Jankovic
          wrote on last edited by
          #18

          That is rather unorthodox approach to dating. It may be a cliché, but why don't you try with something easier, like favorite movie? Instead of favorite date/time format?

          more from me

          1 Reply Last reply
          0
          • T tumbledDown2earth

            Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

            G Offline
            G Offline
            GuyThiebaut
            wrote on last edited by
            #19

            Previously working with SAS and Windows I had great(not) fun with dates as SAS starts its counting in 1960. So for every SAS data you had to apply a weighting to bring it into line with a Windows generated date. Why can't we just have a star date like Catpain[sic] Kirk has? Signing off star date: -309693.60594241496

            “That which can be asserted without evidence, can be dismissed without evidence.”

            ― Christopher Hitchens

            1 Reply Last reply
            0
            • T TheGreatAndPowerfulOz

              That's a greasy situation...

              If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
              You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun
              Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein

              R Offline
              R Offline
              RedDk
              wrote on last edited by
              #20

              That's like trying to ... wait I can't say that in the CP lounge can I?

              1 Reply Last reply
              0
              • H H Brydon

                That is called comparison time format or (almost) ISO 8601[^].

                -- Harvey

                J Offline
                J Offline
                Jan Steyn
                wrote on last edited by
                #21

                And the only format you can safely used around me. I might harm you if you use any other format.

                1 Reply Last reply
                0
                • T tumbledDown2earth

                  Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

                  Mike HankeyM Offline
                  Mike HankeyM Offline
                  Mike Hankey
                  wrote on last edited by
                  #22

                  Until they start talking about there exex, how they hate when a man doesn't leave the seat up, etc... Oh DateTime...never mind!

                  VS2010/Atmel Studio 6.1 ToDo Manager Extension Some days, it's just not worth chewing through the restraints.

                  1 Reply Last reply
                  0
                  • T tumbledDown2earth

                    Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

                    T Offline
                    T Offline
                    tumbledDown2earth
                    wrote on last edited by
                    #23

                    So finally there are 3 known kinds of dates (at least in English) ...

                    1 Reply Last reply
                    0
                    • T tumbledDown2earth

                      Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

                      B Offline
                      B Offline
                      Brady Kelly
                      wrote on last edited by
                      #24

                      Or when you have to randomize dates and times to reflect real world scenarios, like a car's time in a parkade.

                      1 Reply Last reply
                      0
                      • L Lost User

                        tumbledDown2earth wrote:

                        Dates are really wonderful until you get into date-time formats, time-zones and localization and formatted strings

                        As an unformatted Double, it's beauty. It's the localized representations that suck.

                        Console.WriteLine("Posted on star-date: {0}", DateTime.Now.ToOADate());
                        Posted on star-date: 41386,8388463889

                        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                        B Offline
                        B Offline
                        BobJanova
                        wrote on last edited by
                        #25

                        Best thing about this post: even your output has suffered from localisation!

                        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