Get Free Trial

Data Server Date Formatting

Scott Oliver asked on September 17, 2021

I have noticed that the day/month/year function is only supported when using JSON or CSV. Is there an ETA for this to be integrated with the data server? This is integral to how we use our reports.

3 answers

Nadia Khodakivska Nadia Khodakivska Flexmonster September 17, 2021

Hello, Scott,
Thank you for writing to us.
Currently, the Data Server does not support “year/month/day” date format, due to the features of the server architecture. Therefore, I’m afraid that I cannot provide you an ETA for this feature.
However, we can suggest you a solution for splitting dates into three fields. You can provide a custom data source API on your server which will separate the date value to “Year”, “Month”, “Day” fields, then combine it into a multilevel hierarchy.
You may find helpful the following thread with a similar question: 
We hope it helps. You are welcome to write to us in case further questions arise.
Kind regards,

Scott Oliver September 19, 2021

Hello Nadia,
Yes I did look into that, was just emphasising that this is something that is important to us.
This is how I have currently setup my mapping to work around this:

'DP_Year':{dimensionUniqueName:'Dates',caption:'Year',hierarchy:'Date Price'}
,'DP_Month':{type:'month',dimensionUniqueName:'Dates',caption:'Month',hierarchy:'Date Price',parent:'DP_Year'}

It works okay, just frustrating that the additional two columns are required. I do have an issue though that the when I attempt to mark the year as a number type (to fix the sorting), it breaks the hierarchy and the months disappear.
Any suggestions on how to fix this?

Nadia Khodakivska Nadia Khodakivska Flexmonster September 21, 2021

Hello, Scott,
Thank you for your question.
We checked your mapping setup with both number and string type of the year value. The described issue is not reproducible on our side. Sorting for both hierarchy levels works as expected. Please check the following JSFiddle example:
Please let us know if it helps.
Best regards,

Please login or Register to Submit Answer