Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5447

Add DATE_TRUNC for BigQuery

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.33.0
    • None

    Description

      Adding in BigQuery's definition of DATE_TRUNC as described https://g3doc.corp.google.com/company/teams/googlesql/reference/date_functions.md?cl=head#date-trunc

       

      ex.

      DATE_TRUNC('2022-01-05', month) -> 2022-01-01

      DATE_TRUNC('2022-01-05', day) -> 2022-01-05

      DATE_TRUNC('2022-01-05', year) -> 2022-01-01

       

       

      Supported parameters:

      • DAY
      • WEEK
      • WEEK(WEEKDAY)following: SUNDAYMONDAYTUESDAYWEDNESDAYTHURSDAYFRIDAY, or SATURDAY.
      • ISOWEEK
      • MONTH
      • QUARTER
      • YEAR
      • ISOYEAR

       

      Attachments

        Issue Links

          Activity

            People

              oliverlee Oliver Lee
              oliverlee Oliver Lee
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 20m
                  2h 20m