Hey! Are you staying home? We are too. Still, we prepared a new product release for you!🚀

We hope it comes in handy for your business especially these days. Stay safe & pivot on!

Date as a string

Re-Open

Hi
 
I want to build a report (flat one) from JSON and one of the column is

“DateFrom”: “2019-02-28T22:00:00.000Z”,

 
In the fields I am getting DateFrom.Year,DateFrom.Month and DateFrom. Day – how to put complete date as a column in the report.
 
Thanks for help.
 
Regards
Ričardas
 

2 answers

WebDataRocks Team WebDataRocks May 11, 2020

Hi Ricardas,
 
Thank you for writing to us.
 
The default date format can be overridden by specifying the field type in the first object of the input JSON data:

...
dataSource: {
data: [
{
"DateFrom": {
type: "datetime"
}
},
...
//data here
...
]
}

You can find more info on this approach on the following documentation page: https://www.webdatarocks.com/doc/data-types-in-json/
 
Best regards,
WebDataRocks team

Ricardas Kunevicius 5 days ago

Thanks for the reply. It helps. Is ip possible to change datetime format to yyyy-mm-dd?

Please login or Register to Submit Answer