I want to calculate the difference between NOW() and a formula column containing strings formatted as “yyyy/mm/dd”.
As per the documentation, DATETIME_DIFF can take strings formatted as yyyy/mm/dd. This works for constant but for columns I get the error the “field with string type found when date expected”
AFAIK, DATETIME_DIFF always was designed to work with DATE / DATETIME fields. Where did you find reference explaining it works with text?
For now, as a quick workaround, you can convert columns of type string to date/date time - and use this formula.
You can change the field type, from single line text to Date.
This article explains how to perform various actions on a field- like rename, change field type, default, field width, record height, show/hide.
We will add more specific details to the document. DATETIME_DIFF supports arguments of only date & datetime type.
I have a column of strings that comes from another source whose field type is string and I don’t want to modify the same.
How can I create a new column that stays in sync with the column containing strings but with the field type of Datetime ?
You will have to rely on Scripts & use API.
Currently, duplicate column doesn’t duplicate data & there is no defined way to keep two columns in sync.
A formula column with a function for converting strings to datetime is what I was looking for.
I will see if I can try to emulate this with the API.