csv file date form
year month day
2020 2020-01 2020-01-01
year is only in 2020, The month is in the format of 2020-01-01, followed by day by default.
I want the month to be output in the same format as the csv file in 2020-01, 2020-02 format.
How do I do this?
grid attached.
Hi!
Thank you for posting your question.
In order to make sure all the date fields are displayed as expected in the grid, we would recommend specifying their structure with the help of the Mapping object. Among all of its benefits, it lets you set the field's type and, in case of date fields, its format:
report: {
mapping: {
year: {
type: "date string",
format: "YYYY"
},
month: {
type: "date string",
format: "YYYY-MM"
},
day: {
type: "date string",
format: "YYYY-MM-DD"
},
...
},
...
}
The mapping configuration above provides the date format similar to what you've described as your desired result.
You might also find the following date & time formatting reference helpful since it contains a detailed overview of all of the available date patterns: https://www.flexmonster.com/doc/date-and-time-formatting/
Please let us know if this helps.
Best regards,
Mykhailo
Hi,
How are you?
We were wondering if you've received our response to your question. Was it helpful, or is there still anything we can help you with?
We would be happy to hear your feedback.
Best regards,
Mykhailo
Hi,
Hope you're doing well!
Just checking in to ask whether you've found our response helpful. Is there still anything we can help you with?
Please let us know what you think.
Regards,
Mykhailo