String to date

  • 29 July 2021
  • 1 reply
  • 74 views

Is it possible create a customer dimension in looker for date using string data? Does it need to be in a particular format ie (YEAR-MONTH-DAY as opposed to DAY-MONTH-YEAR)


1 reply

Userlevel 1

Yes, but it seems like something that should be done in your database, not Looker. Without knowing your database, all I can say is read up on its relevant date functions.

If you are not a lookml developer, there are table calc functions that can get you where you need to go. But since it’s table calc, it’s not reusable from the model.

https://docs.looker.com/exploring-data/creating-looker-expressions/looker-functions-and-operators#date

Reply