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. Seriously guys?

Seriously guys?

Scheduled Pinned Locked Moved The Lounge
question
20 Posts 11 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.
  • L Lost User

    If you wish to format a date in Power Apps, there is a nice set of format letters to provide custom output. So using the Text function I can write

    Text(myDate, "mmm dd yy") // May 09 24

    Or for time I can write

    Text(myTime, "hhmm") // 1644

    Or I can combine them into

    Text(myDateTime, "hhmm mmm dd yy") // 1644 16 09 24

    Why would anyone think to use the same lower case letters for two very distinct fields? There is actually a work-around, make sure dd comes first in the date. Good luck 'mercans. :-D

    T Offline
    T Offline
    trønderen
    wrote on last edited by
    #8

    I tried to make a struct with two fields named mm and mmm respectively. The compiler accepted it without any warning. Confusing, isn't it? :-)

    Religious freedom is the freedom to say that two plus two make five.

    J L 2 Replies Last reply
    0
    • J jackbrownii

      Richard MacCutchan wrote: There is actually a work-around, make sure dd comes first in the date. Good luck 'mercans. Big Grin | :-D I would make sure dd comes last. yyyy-mm-dd is my default format.

      J Offline
      J Offline
      jochance
      wrote on last edited by
      #9

      ISO or so-so.

      1 Reply Last reply
      0
      • T trønderen

        I tried to make a struct with two fields named mm and mmm respectively. The compiler accepted it without any warning. Confusing, isn't it? :-)

        Religious freedom is the freedom to say that two plus two make five.

        J Offline
        J Offline
        jochance
        wrote on last edited by
        #10

        What if they need the minutes, then the three letter month, then the minutes again, then the two digit numeric month? We won't ask why, but hypothetically speaking...

        T 1 Reply Last reply
        0
        • T trønderen

          I tried to make a struct with two fields named mm and mmm respectively. The compiler accepted it without any warning. Confusing, isn't it? :-)

          Religious freedom is the freedom to say that two plus two make five.

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

          Not for the compiler. :-D

          1 Reply Last reply
          0
          • L Lost User

            If you wish to format a date in Power Apps, there is a nice set of format letters to provide custom output. So using the Text function I can write

            Text(myDate, "mmm dd yy") // May 09 24

            Or for time I can write

            Text(myTime, "hhmm") // 1644

            Or I can combine them into

            Text(myDateTime, "hhmm mmm dd yy") // 1644 16 09 24

            Why would anyone think to use the same lower case letters for two very distinct fields? There is actually a work-around, make sure dd comes first in the date. Good luck 'mercans. :-D

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #12

            Richard MacCutchan wrote:

            Why would anyone think to use the same lower case letters for two very distinct fields?

            History? Following has 'd' and 'D'. And 'c' and 'C'. Formatting Calendar Time (The GNU C Library)[^] Then there is "C Programming Language 2 edition" copyright 1988 which uses 'm' for minute and 'M' for month. And others.

            1 Reply Last reply
            0
            • L Lost User

              If you wish to format a date in Power Apps, there is a nice set of format letters to provide custom output. So using the Text function I can write

              Text(myDate, "mmm dd yy") // May 09 24

              Or for time I can write

              Text(myTime, "hhmm") // 1644

              Or I can combine them into

              Text(myDateTime, "hhmm mmm dd yy") // 1644 16 09 24

              Why would anyone think to use the same lower case letters for two very distinct fields? There is actually a work-around, make sure dd comes first in the date. Good luck 'mercans. :-D

              C Offline
              C Offline
              CPallini
              wrote on last edited by
              #13

              Wait... Is today 10/5 or 5/10?

              "In testa che avete, Signor di Ceprano?" -- Rigoletto

              L 1 Reply Last reply
              0
              • C CPallini

                Wait... Is today 10/5 or 5/10?

                "In testa che avete, Signor di Ceprano?" -- Rigoletto

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

                It's both of course. :-D

                1 Reply Last reply
                0
                • L Lost User

                  If you wish to format a date in Power Apps, there is a nice set of format letters to provide custom output. So using the Text function I can write

                  Text(myDate, "mmm dd yy") // May 09 24

                  Or for time I can write

                  Text(myTime, "hhmm") // 1644

                  Or I can combine them into

                  Text(myDateTime, "hhmm mmm dd yy") // 1644 16 09 24

                  Why would anyone think to use the same lower case letters for two very distinct fields? There is actually a work-around, make sure dd comes first in the date. Good luck 'mercans. :-D

                  E Offline
                  E Offline
                  englebart
                  wrote on last edited by
                  #15

                  I always use yyyy-MM-dd or dd MMM yyyy and always include timezones with times. Multiple hemispheres/countries/etc

                  L 1 Reply Last reply
                  0
                  • E englebart

                    I always use yyyy-MM-dd or dd MMM yyyy and always include timezones with times. Multiple hemispheres/countries/etc

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

                    Fine, but if you read my post you will see that "MM" or "MMM" are not valid format specifiers.

                    T 1 Reply Last reply
                    0
                    • J jochance

                      What if they need the minutes, then the three letter month, then the minutes again, then the two digit numeric month? We won't ask why, but hypothetically speaking...

                      T Offline
                      T Offline
                      trønderen
                      wrote on last edited by
                      #17

                      Doesn't PowerApps know whether it is formatting a time object or a date object? That would surprise me a lot. If I were to develop a formatting function, and was told "No no - you can't use that character to indicate a certain formatting - it has been used to format a very distinct field in a another value type", then I would scream out in protest. I cannot let the format strings for "my" type be limited by the format strings for all other types! That being said: Doing detail formatting of times and dates is blatant anti-internationalization, an explicit effort to make it difficult to adapt you solution to other markets, an invitation for customers outside your own locale to misunderstand or not understand the data you output. Don't do that! Use locale dependent formatting, and stop fiddling around with literal format strings!

                      Religious freedom is the freedom to say that two plus two make five.

                      J 1 Reply Last reply
                      0
                      • L Lost User

                        Fine, but if you read my post you will see that "MM" or "MMM" are not valid format specifiers.

                        T Offline
                        T Offline
                        trønderen
                        wrote on last edited by
                        #18

                        Forget about all format specifiers and use locale dependent formatting. Forcing your own locale formatting down the throat of customers in other locales is a bad thing to do.

                        Religious freedom is the freedom to say that two plus two make five.

                        L 1 Reply Last reply
                        0
                        • T trønderen

                          Forget about all format specifiers and use locale dependent formatting. Forcing your own locale formatting down the throat of customers in other locales is a bad thing to do.

                          Religious freedom is the freedom to say that two plus two make five.

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

                          I didn't say it was a good thing. I was merely pointing out how having to use the same letter for two different fields is a rather bad design choice.

                          1 Reply Last reply
                          0
                          • T trønderen

                            Doesn't PowerApps know whether it is formatting a time object or a date object? That would surprise me a lot. If I were to develop a formatting function, and was told "No no - you can't use that character to indicate a certain formatting - it has been used to format a very distinct field in a another value type", then I would scream out in protest. I cannot let the format strings for "my" type be limited by the format strings for all other types! That being said: Doing detail formatting of times and dates is blatant anti-internationalization, an explicit effort to make it difficult to adapt you solution to other markets, an invitation for customers outside your own locale to misunderstand or not understand the data you output. Don't do that! Use locale dependent formatting, and stop fiddling around with literal format strings!

                            Religious freedom is the freedom to say that two plus two make five.

                            J Offline
                            J Offline
                            jochance
                            wrote on last edited by
                            #20

                            Agreed. If you're not typing 'Culture' somewhere on those lines then you're probably doing it wrong.

                            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