Get Free Trial

Some weird issue coming in date column

amir asked on November 9, 2020

I have a simple flexmonster chart. You can access that by opening the file attached into the flexmonster. Than it shows a report by default.
Then go to options and convert it to flat table. After this enable all columns to show all columns in the flat table.
Now the problem is that the data shown is inconsistent. Some date columns have data and some not. Also when i try to export into excel it hangs the chart.
Please guide me what i am doing wrong here
Just in case if this helps my data is actually like 
                [“createdAt”: “2020-02-04T15:48:40.190Z”,
                “accessData: {
                      “accessedAt”: “2020-02-04T15:48:22.263Z”,
                      “accessData.modifiedAt”: “2020-05-04T20:32:05.669Z”,
                “name”: “Sam”]
and i am converting (making flat) this into 
                “createdAt”: “2020-02-04T15:48:40.190Z”,
                “accessData.accessedAt”: “2020-02-04T15:48:22.263Z”,
                “accessData.modifiedAt”: “2020-05-04T20:32:05.669Z”,
                “name”: “Sam”
My second question is that through out my application we use date format as ‘mm/dd/yyyy’. Even on flexmonster grid(using datePattern in options object). But when i export grid into excel the excel file exported has date format as ‘dd/mm/yyyy’. Is there any way i can change date format in exported excel to ‘mm/dd/yyyy’

report (28).json

6 answers

Milena Pechura Milena Pechura Flexmonster November 12, 2020

Hi, Amir,
Apologies for the late response.
Thank you for your questions and for providing the report. Please find our explanations regarding each point below.
1. As the "date" type separates the date value to date.year, date.month, and (where the date is a kind of dimension), we have not implemented the dimension feature for several "date" type fields in Flexmonster.
This is the reason why the grouping of accessData.modifiedAt and accessData.accessedAt led to an unexpected result – some values are not shown.
To fix the issue, our team recommends not to group several fields with the "date" type. If it is needed to group the mentioned fields under one dimension, we suggest specifying the "date string" type for the fields. Please note that you could also group a "date" type field with fields of other types.
2. We would like to kindly inform you that the described component behavior is expected: for the Excel export, Flexmonster sets the “default” format for the data. This means that the date format in the exported file opened in Excel will depend on the format configured in your OS settings.
Please let us know if it helps and if any other questions arise.
Best regards,

amir November 18, 2020

Thank you for the response i have one another query for date type fields.
I have a flexmonster chart and in this i have set date type to ‘date’ in order to enable user to use year, months and days in chart. Now in chart this is ok but when the end user converts chart to grid (say flat grid) the date columns is shown in 3 seperate columns (year, month an day).
Is their any way the user when changing the chart to grid view can change the date column type to date string from the toolbar configuration or anywhere else from the front end. If so how?

Milena Pechura Milena Pechura Flexmonster November 20, 2020

Hello, Amir,
Thank you for your question.
As the most efficient solution for your case, we suggest the approach shown in the following example:
The main idea is creating a duplicate for the date field in the data passed to Flexmonster. These two fields with the same data should have different types – "date" and "date string". While switching between charts and flat view, a new slice with a preferable field will be set in the runQuery API call.
Here is the list of methods and events our team used in the example:

Please let us know if the suggested approach works for you.
Kind regards,

Milena Pechura Milena Pechura Flexmonster November 26, 2020

Hi, Amir,
Hope you are doing well.
We are wondering whether the suggested approach works for you.
Our team will be glad to hear your feedback.
Best regards,

Milena Pechura Milena Pechura Flexmonster December 15, 2020

Hello, Amir,
How are you?
We would like to kindly take an interest in whether our response helped.
Have you achieved the desired component behavior?
Looking forward to hearing from you.
Kind regards,

amir December 15, 2020

Thank you for your response yes the answer proved to be of help 

Please login or Register to Submit Answer