• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Displaying time and date in text form

    Dashboard Designer & Custom AngularJS Pages
    4
    10
    3.0k
    Loading More Posts
    • 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.
    • B
      Bhanner
      last edited by

      Hi,

      I want to display the current system time and date in text form on my SCADA Screens

      Does anyone know an easy way to do it?

      Regards

      Billy

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        @Bhanner do you mean in Graphical Views or Dashboard designer/Custom pages? What do you mean in text form?

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • B
          Bhanner
          last edited by

          @Jared-Wiltshire

          Hi

          I know there is a analogue clock built into the software i'm after something like this

          0_1512522282796_99bfdc67-198a-46ab-8b90-ef9539bad32b-image.png
          Regards
          Billy

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            @Bhanner I'm going to assume you are talking about custom pages, check the examples at /ui/examples/basics/clocks-and-timezones

            Here's a quick example

            <ma-now update-interval="1 SECONDS" output="time"></ma-now>
            
            <!-- Format date according to user's locale -->
            <div>{{time|maMoment:'format':'LTS l'}}</div>
            
            <!-- Explicit date format -->
            <div>{{time|maMoment:'format':'H:mm:ss A M/D/YYYY'}}</div>
            

            Developer at Radix IoT

            B 1 Reply Last reply Reply Quote 1
            • B
              Bhanner @Jared Wiltshire
              last edited by

              @jared-wiltshire
              Hi,
              Is there a way to incorperate this into an object so it can moved around the screen?

              1 Reply Last reply Reply Quote 0
              • Jared WiltshireJ
                Jared Wiltshire
                last edited by

                If you are talking about in dashboard designer, just give the <div> an ID. e.g. <div id="my-time-object">

                Developer at Radix IoT

                1 Reply Last reply Reply Quote 0
                • B
                  Bhanner
                  last edited by

                  @jared-wiltshire said in Displaying time and date in text form:

                  'H:mm:ss A M/D/YYYY'}

                  Thanks Jared,
                  That was exactly what i was after :)
                  Kind regards
                  Billy H

                  1 Reply Last reply Reply Quote 0
                  • D
                    dovydasz
                    last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • D
                      dovydasz
                      last edited by

                      Hello,

                      how can I uppercase letters?
                      Now I have:

                      <ma-now update-interval="1 SECONDS" output="time"></ma-now>
                      
                      <div >{{time|maMoment: 'format':'MMMM Do, dddd'}}</div>
                      // sausio 12-oji, penktadienis
                      <div >{{time|maMoment: 'format':'dddd'}}</div>
                      // penktadienis
                      

                      All letters are lowercase always...

                      Locale on OS is set to Lithuania:
                      [mango@Mango ~]$ localectl status
                      System Locale: LANG=lt_LT.utf8
                      VC Keymap: us
                      X11 Layout: us

                      1 Reply Last reply Reply Quote 0
                      • phildunlapP
                        phildunlap
                        last edited by

                        Hi dovydas,

                        Can you provide an example input and output for the uppercasing you're talking about? Have you checked out the angular "uppercase" filter? It will easily allow you to uppercase the whole date, like,

                        <ma-now update-interval="1 SECONDS" output="time"></ma-now>
                        
                        <div >{{time|maMoment: 'format':'MMMM Do, dddd' | uppercase}}</div>
                        // sausio 12-oji, penktadienis
                        <div >{{time|maMoment: 'format':'dddd' | uppercase}}</div>
                        // penktadienis
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post