Date parameter in text box - download issue

Hi team,

I have a report which I have set up a heading title which uses a date parameter (a reporting week starting). In the visual on the dashboard the text displays fine, but when I download to PDF the report appears to be an Epoch date.

Dashbaord:
image

PDF download:
image

How do I stop this happenning?

Thanks,
Q

Hello @QSCommUser , thanks for posting into the community.

In this case the behaviour you are observing is because the date time parameters are stored in timestamp format (notice that parameters are also commonly used in URLs so having a format that is simple to enconde (an integer in this case).

Here what you can do in order to have the expected format is

  1. Create an insight visual
  2. Close the menu that asks you to choose the insight type (click on the✖️)
  3. Click on the image button
  4. In the editor type << (this will open the calculation editor)
  5. In the calculation enter the code that you see below:
formatDate(${dateParameter},'yyyy-MM-dd')

This should format the date as a string and should show it as so in the email reports.

Hope it helps, please mark this solution as solved if that’s the case also to help other members of the community., otherwise let us know.

Happy dashboarding!

1 Like

@EnriqueS - thank you very much for the above.

I have created the insight - but what am I supposed to do with this now? Style and shape it, then place it over where I previously had the date parameter in the text box?

If so, it feels like a rather long winded way around. If you are able to use parameters in the text box, then why not have the ability to display / download the data without the above work around?

BTW - I have done the above and it appears to work.

Thanks,
Q

1 Like

Hello, yes, I agree that the solution is more complex than just using the text visual. For that reason I will open an internal ticket to see if we can modify its behavior or otherwise add it as a feature request.

Thanks you very much.

1 Like

Hi @EnriqueS - thanks for the follow up.

Great - looking forward to see if this behaviour can be enhanced!