• 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

    Date/Time format

    Scheduled Pinned Locked Moved User help
    7 Posts 3 Posters 1.6k Views 3 Watching
    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.
    • R Offline
      Robmalone
      last edited by

      Hi all,
      I am having some trouble parsing a date/time stamp from a http retriever data source. The regex appears to be working as it is getting the correct raw data but no mater what i put into the Time Format field I either get an error " 'Portlaoise Weather': Failed to parse time "2020-04-27T11:55:06" for Portlaoise Weather - Temperature" or if I only put yyyyMMdd in to the Time format field i get the wrong date of "2019-12-04" returned.
      What should I enter in the Time Format field to get 2020-04-27 11:55:06 for the data/timestamp above?
      Thanks.

      1 Reply Last reply Reply Quote 0
      • CraigWebC Offline
        CraigWeb
        last edited by

        Hi Rob

        Did you try changing the time capture group to 1?

        1 Reply Last reply Reply Quote 0
        • R Offline
          Robmalone
          last edited by

          Hi @CraigWeb. Yes I tried both 0 and 1 for the capture group.

          1 Reply Last reply Reply Quote 0
          • CraigWebC Offline
            CraigWeb
            last edited by CraigWeb

            This should do the trick if your time regex is working.
            yyyy-MM-dd'T'hh:mm:ss

            1 Reply Last reply Reply Quote 0
            • R Offline
              Robmalone
              last edited by Robmalone

              Thanks @CraigWeb. Well don't i feel like an idiot! Not sure where I was going wrong, I thought that's how I had it but when I copied your format in and it worked first time. Thanks again.

              Edit: Just as a matter of interest - If it was unix time what would the format be?

              MattFoxM 1 Reply Last reply Reply Quote 0
              • MattFoxM Offline
                MattFox @Robmalone
                last edited by MattFox

                @robmalone (\d+) => digit plus all the following characters straight after that are the same assuming this is regex and not a timestamp format
                Just realised this is using the SimpleDateFormat Library. According to docs you can use epoch
                https://help.sumologic.com/03Send-Data/Sources/04Reference-Information-for-Sources/Timestamps%2C-Time-Zones%2C-Time-Ranges%2C-and-Date-Formats#Timestamp_conventions

                Do not follow where the path may lead; go instead where there is no path.
                And leave a trail - Muriel Strode

                1 Reply Last reply Reply Quote 0
                • R Offline
                  Robmalone
                  last edited by

                  Thanks @MattFox

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post