av-mihailov Posted July 6, 2020 Share Posted July 6, 2020 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:{ "resource":[ { "resourceType":"resource1", "datePerformed":"2020-06-19T13:23:00" } ]} Link to comment Share on other sites More sharing options...
darth_fader Posted July 6, 2020 Share Posted July 6, 2020 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)) Link to comment Share on other sites More sharing options...
av-mihailov Posted July 7, 2020 Author Share Posted July 7, 2020 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 Link to comment Share on other sites More sharing options...
av-mihailov Posted July 7, 2020 Author Share Posted July 7, 2020 Damn, I could use variables.The question may be closed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now