Page 1 of 1

String Type Field and Calculated Column

Posted: Tue Oct 22, 2024 2:29 pm
by Joyfulness
Good afternoon,

I hope you are doing well. I am using a JSON data source, and the field/data I am using contains start dates and is a string type.

I am trying to build a calculated field with the following details:

Type = Long

Value = (Today-root_data_time.start_date).Days

However, the calculated column does not return any data.

The only way I can get the calculated column to return data is if I change the type on the start_date field to datetime - but this then changes the dates, rendering both the start_date field and the calculated column incorrect.

Can you please advise me on what I may be doing wrong? Thank you!

Re: String Type Field and Calculated Column

Posted: Wed Oct 23, 2024 2:05 pm
by Lech Kulikowski
Hello,

Try to use the DateTime.Parse() function to parse your string to datetime.

Thank you.