Date Format changes when in week

6be645f3-da39-4cb6-a517-2bf75b244403.gif

Hi team,

I transformed the incoming date format as follows:

date(TO_VARCHAR(TO_DATE(<date>,'MM/DD/YY'),'YYYY-MM-DD'))

The table and downloading the output in a .csv show the correct format.

I am using a dimension group in Looker:

  dimension_group: hub_receipt_date_grp {
    type: time
    timeframes: [
      raw,
      date,
      week,
      month,
      quarter,
      year
    ]
    convert_tz: no
    datatype: date
    sql: ${TABLE}."<date>" ;;

Now, when I add the dimension into an explore the date still shows up with two leading zeros. It correctly shows the date when I add week and month. The gif shows that the format is ‘0021-01-01’ when I add the week and ‘2021-01-01’ when I additionally add the month.

Any idea what is causing this?

0 0 234
0 REPLIES 0
Top Labels in this Space