Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.34.0
    • None

    Description

      Add support for BigQuery's DATETIME_ADD/DATETIME_DIFF functions.

      DATETIME_ADD(datetime, interval) can accept a timestamp (or a datetime, which is an alias for timestamp) for its first argument and an interval for its second. The output is the datetime that occurs interval after the provided datetime.

      DATETIME_DIFF(datetime, datetime2, timeUnit) returns the whole number of timeUnit between datetime and datetime2, with the result being negative if datetime occurs before datetime2

      Examples:
      DATETIME_ADD(TIMESTAMP '2008-12-25 15:30:00', INTERVAL 5 MINUTE) would return: '2008-12-25 15:35:00'.

      DATETIME_DIFF(DATETIME '2008-12-25 15:30:00', DATETIME '2008-12-26 15:30:00', DAY) would return: -1.

      Attachments

        Issue Links

          Activity

            People

              tanclary Tanner Clary
              tanclary Tanner Clary
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m