How to format parameter in URL

I want to add URL action to a bar chart with date parameter in the format of YYYY-MM-DD.
How can I add formatDate function to the URL?

Hi @baduong ,

You can do this with a calculated field and the concat function as follows:

concat(‘https://mydomain.com/someresource?dataParam=’, formatDate(${dateparam}, ‘yyyy-MM-dd’) )

The result looks like this:

ws

Thank you for your suggestion. The thing is I’m doing that in the bar chart. And if we use the calculated field, we have to add it to the bar chart which cause the bar chart off the concept.

Hi @baduong ,

Here’s a potential work-around:

Is the date in the bar chart? If so, format it with YYYY-MM-DD:

Then create an action with a select activation with a url action and use the date in the url :

This generates this url when clicking on the bar chart:
https://www.amazon.com/2018-12-21T00:00:00.000Z

Otherwise, I think the best Quicksight feature enhancement is allow a function call inside the brackets for the variable, e.g. <<formatDate($SalesDate, ‘YYYY-MM-DD’)>>. Let me know if you have any thoughts on this and I’ll submit a feature request.

ws

Really appreciate your help.
I don’t have the date in the bar chart. Just warehouse id and inbound volume. The date range is input parameters.