Skip to main content



Date is used whenever you have a column or SQL expression that returns a partial (e.g. Year) or fully qualfied date (e.g. 2020-01-06) or datetime.


For date, Veezoo assumes that the sql is a SQL date/datetime expression. This means that in case it is not, you should change sql to be a casting operation in your SQL dialect, e.g. sql: "TO_DATE(${ORDERS.date_str}, 'YYYYMMDD')" or directly in your database.

It is also required to specify the granularity by setting datetime_format. This is usually inferred by Veezoo when importing your schema. The most common are:

  • YearFormat (e.g. 2020)
  • DayFormat (e.g. 2020-10-01)
  • TimeFormat (e.g. 2020-10-01 13:00:00)

File: hitchhiker/knowledge-base/classes/Order.vkl

import: [

kb {

class Order {


date Order_Date {
name.en: "Order Date"

sql: "${ORDERS.order_date}"

datetime_format: DayFormat