How do i can get date from string field in json datasource?


I want get date time from string field in JsonDataSource.
When I use Field Expression like "resource.*(resourceType=="resource1").datePerformed" returns value type String.
Example json:







av-mihailov's picture
Joined: Jul 6 2020 - 7:12am
Last seen: 1 month 4 weeks ago

You can always convert the string to a date using SimpleDateFormat, something like

new Date(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").parse(datePerformedField))

darth_fader - 2 months 2 weeks ago

I know about it, but I want return field with DateTime type, because I'll use it in another function to count age, month and day on this date. And with this function my text field expression is very big

av-mihailov - 2 months 2 weeks ago

Damn, I could use variables.
The question may be closed

av-mihailov - 2 months 2 weeks ago

0 Answers:

No answers yet