You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aklein-1s (via GitHub)" <gi...@apache.org> on 2025/08/12 14:40:23 UTC
[D] Convert timestamp to date with handlebar [superset]
GitHub user aklein-1s created a discussion: Convert timestamp to date with handlebar
Hello !
I try to create an handlebar to make a custom list, and I have to format timestamp to date, but I don't know how to do this.
Do you have any idea how to do this ??
By the way, when I'm using 3 columns or more, the chart editor is very slow or frozen, I don't know why... Do you have any returns about handlebar ?
Thank you.
GitHub link: https://github.com/apache/superset/discussions/34656
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Convert timestamp to date with handlebar [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Convert timestamp to date with handlebar
<!-- Answer -->
You can format a timestamp to a date in Superset's Handlebars templates using the built-in `dateFormat` helper. For example:
`{{dateFormat my_timestamp format="YYYY-MM-DD"}}`
You can customize the format string (e.g., `"MMMM YYYY"` for "August 2025") as needed. This helper uses dayjs under the hood, so most date formatting patterns are supported out of the box. Other useful helpers include `stringify` for JSON, `formatNumber` for locale-based number formatting, and `parseJson` for parsing JSON strings. You don't need to create your own helpers for these common cases—they're already available in Superset's Handlebars integration [[source]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx).
Regarding slowness or freezing in the chart editor with 3 or more columns and Handlebars, there aren't any recent fixes or known issues specifically about this in the codebase or documentation. If performance is a problem, try reducing the number of columns, simplifying your Handlebars templates, or monitoring browser performance to see if a particular column or template logic is causing the slowdown. If you can share your Superset version or a sample template, it might help narrow down the cause.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34656)
GitHub link: https://github.com/apache/superset/discussions/34656#discussioncomment-14083467
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Convert timestamp to date with handlebar [superset]
Posted by "aklein-1s (via GitHub)" <gi...@apache.org>.
GitHub user aklein-1s closed a discussion: Convert timestamp to date with handlebar
Hello !
I try to create an handlebar to make a custom list, and I have to format timestamp to date, but I don't know how to do this.
Do you have any idea how to do this ??
By the way, when I'm using 3 columns or more, the chart editor is very slow or frozen, I don't know why... Do you have any returns about handlebar ?
Thank you.
GitHub link: https://github.com/apache/superset/discussions/34656
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Convert timestamp to date with handlebar [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Convert timestamp to date with handlebar
<!-- Answer -->
You can format a timestamp to a date in Superset's Handlebars templates using the built-in `dateFormat` helper. For example:
`{{dateFormat my_timestamp format="YYYY-MM-DD"}}`
You can customize the format string (e.g., `"MMMM YYYY"` for "August 2025") as needed. This helper uses dayjs under the hood, so most date formatting patterns are supported out of the box. Other useful helpers include `stringify` for JSON, `formatNumber` for locale-based number formatting, and `parseJson` for parsing JSON strings. You don't need to create your own helpers for these common cases—they're already available in Superset's Handlebars integration [[source]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx).
Regarding slowness or freezing in the chart editor with 3 or more columns and Handlebars, there aren't any recent fixes or known issues specifically about this in the codebase or documentation. If performance is a problem, try reducing the number of columns, simplifying your Handlebars templates, or monitoring browser performance to see if a particular column or template logic is causing the slowdown. If you can share your Superset version or a sample template, it might help narrow down the cause.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=2d671b7b-603f-4f1c-ba5e-3e90bcb5c2c9) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/34656#discussioncomment-14083467
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org