Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-2583

FIWARE.Request.Tech.Data.CEP.Date format

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Dear tali,

      regarding the CEP output format for the date, I know it's a built in
      attribute type for the event and it's generated in a strange format:

      {"OccurrenceTime":*"22\/04\/2015-* 12:50:42","Annotation":"","Duration":"0.0","EventId":"a5f572c6-c920-4ffb-a825-a9a3a3bcb59e","DetectionTime":"22\/04\/2015-12:50:42"}

      Is it possible to generate the date in other format for example:
      22-04-2015-
      So it would be easier for parsing ?

      Best,
      Ahmed Sadek

      _______________________________________________
      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fi-ware.org
      https://lists.fi-ware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: Ahmed Sadek <don1559@gmail.com>]

      1. LiveDemo.json
        37 kB
        Fabiana Fournier

        Activity

        Hide
        TALI Fabiana Fournier added a comment -

        Dear Ahmed,

        Yes, you can control the date format, by setting a dateFormat property in
        the consumer definition.
        From the user guide:

        Date formatter - the default date format is dd/MM/YYYY-HH:mm:ss. If you
        would like to use a different format for your output events, you have to
        specify a date formatter (e.g., dd.MM.yyyy G 'at' HH:mm:ss z)

        You can see example for using it in the PSB consumer of the LiveDemo
        project definition (attached)

        Best regards,
        Tali

        Tali Yatzkar Haham
        Smart Decision Solutions
        IBM Haifa Research Lab, Israel
        tali@il.ibm.com 972-4-8296320

        From: Ahmed Sadek <don1559@gmail.com>
        To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he."
        <fiware-tech-help@lists.fi-ware.org>
        Date: 22/04/2015 02:00 PM
        Subject: regarding format CEP

        Dear tali,

        regarding the CEP output format for the date, I know it's a built in
        attribute type for the event and it's generated in a strange format:

        {"OccurrenceTime":"22\/04\/2015- 12:50:42","Annotation":"","Duration":"0.0","EventId":"a5f572c6-c920-4ffb-a825-a9a3a3bcb59e","DetectionTime":"22\/04\/2015-12:50:42"}

        Is it possible to generate the date in other format for example:
        22-04-2015-
        So it would be easier for parsing ?

        Best,
        Ahmed Sadek

        Show
        TALI Fabiana Fournier added a comment - Dear Ahmed, Yes, you can control the date format, by setting a dateFormat property in the consumer definition. From the user guide: Date formatter - the default date format is dd/MM/YYYY-HH:mm:ss. If you would like to use a different format for your output events, you have to specify a date formatter (e.g., dd.MM.yyyy G 'at' HH:mm:ss z) You can see example for using it in the PSB consumer of the LiveDemo project definition (attached) Best regards, Tali Tali Yatzkar Haham Smart Decision Solutions IBM Haifa Research Lab, Israel tali@il.ibm.com 972-4-8296320 From: Ahmed Sadek <don1559@gmail.com> To: Tali Yatzkar-Haham/Haifa/IBM@IBMIL, "fiware-tech-he." <fiware-tech-help@lists.fi-ware.org> Date: 22/04/2015 02:00 PM Subject: regarding format CEP Dear tali, regarding the CEP output format for the date, I know it's a built in attribute type for the event and it's generated in a strange format: {"OccurrenceTime":"22\/04\/2015- 12:50:42","Annotation":"","Duration":"0.0","EventId":"a5f572c6-c920-4ffb-a825-a9a3a3bcb59e","DetectionTime":"22\/04\/2015-12:50:42"} Is it possible to generate the date in other format for example: 22-04-2015- So it would be easier for parsing ? Best, Ahmed Sadek

          People

          • Assignee:
            TALI Fabiana Fournier
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: