html rendered_value in dimension not respecting date format

Not sure if it began today but I have the following set up for dates in my view:

dimension: this_date {

  type: date

  html: {{ rendered_value | date: “%b-%y” }}

  sql: ...

}

However, the output now comes out in this format:

%Y-%m-%d

No code changes on my end. 

Solved Solved
0 4 1,005
1 ACCEPTED SOLUTION

You can override this by adding new_lookml_runtime: no to your manifest file. 

View solution in original post

4 REPLIES 4

n_davis
Participant V

@edgar1  Interesting! Did you get a new version of Looker? Check to see if “Use Legacy LookML Runtime” in the Legacy Features Admin menu is toggled on. We had problems with 22.14 dates when that was turned off.

Another thing I’d check is to make sure you’re using ‘ ‘ instead of “ “ in the html.

dimension: this_date {

type: date

html: {{ rendered_value | date: '%b-%y' }}

sql: ...

}

You can override this by adding new_lookml_runtime: no to your manifest file. 

Thank you both!

@n_davis that was a typo on my end, they are indeed double quotes.

The current documentation has not been updated: https://cloud.google.com/looker/docs/best-practices/how-to-use-liquid-to-format-dates

Wanted to comment on this so others who are facing the same issue may know. 

It looks like this is indeed caused by the new_lookml_runtime as @Lyndsey_Pilegg1 and @n_davis mentioned above.  Disabling that caused the rendered_value date formats to work once again.  This fix appears to only work for another 6 months or so before new_lookml_runtime is pushed as the only option, so hopefully a fix is rolled out before then for it.

Top Labels in this Space
Top Solution Authors