Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-20951

Add 'datetime' difference functionality to STD.Date

    XMLWordPrintable

    Details

      Description

      Request a STD.Date library function that returns the difference in seconds (or some user defined granularity) between two datetime stamps. Functionality along the lines of:

      GetSeconds(STRING dt) := FUNCTION // Input YYYY-MM-DD HH:MM:SSGetSeconds(STRING dt) := FUNCTION // Input YYYY-MM-DD HH:MM:SS
          RETURN STD.Date.SecondsFromParts((UNSIGNED4)dt[1..4]
                                          ,(UNSIGNED4)dt[6..7]
                                          ,(UNSIGNED4)dt[9..10]
                                          ,(UNSIGNED4)dt[12..13]
                                          ,(UNSIGNED4)dt[15..16]
                                          ,(UNSIGNED4)dt[18..19]);
      END;
      FileTime := GetSeconds('2018-11-13 17:13:44');
      FileTime;
      NowTime  := GetSeconds('2018-11-13 17:15:45');
      NowTime;
      NowTime-FileTime;
      

      Yours

      AllanĀ 

        Attachments

          Activity

            People

            • Assignee:
              dcamper Dan S. Camper
              Reporter:
              allan Allan Francis Wrobel
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: