Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5498

TIMEVALUE() of a DateTime value always returns 0

    XMLWordPrintable

    Details

    • Story Points:
      0
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Sprint Team:
      Maintenance
    • Steps to Reproduce:
      Hide

      Let "v" be a Date+Time value. Then:
      DateValue(v)
      returns the correct value, but
      TimeValue(v)
      returns 0.

      Show
      Let "v" be a Date+Time value. Then: DateValue(v) returns the correct value, but TimeValue(v) returns 0.

      Description

      That's because internally v is tagged as TYPE_DATE (instead of TYPE_DATETIME) and thus truncated to whole days.

      Fixing date/time/date+time values to be instead tagged as TYPE_DATETIME by default exposes the latent bug in DateValue that it should truncate the value to a date (not date+time), but does not.

      The attached patches fixes these issues, respectively.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lmamane Lionel Elie Mamane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: