Insert Dynamic Value Through Variable In Formula

Hi Team,
I wants to insert the dynamic value through variable in formula.
eg: filterByFormula: “IS_AFTER({Time-stamp}, dateValue)”

Here dateValue is a variable that gives error. but if i use the string instead variable it works . Also variable is type of string . Please suggest the best way to insert the variable value in formula.

To fix your formula, dateValue needs to be replaced with a value that is a datetime type. That could look like:

IS_AFTER({Time-stamp}, {Some Other Date Column})

Or if the value is the same for every row, you could use DATESTR (which converts a properly formatted string to datetime):

IS_AFTER({Time-stamp}, DATESTR("2015-11-12"))

Also it seems odd to me to see the words variable and formula in the same sentence. I’m tempted to say formulas don’t have variables, but I suppose a {column name} is a variable since it’s a dynamic value. But I can’t, for example, pick a word that only exists in a formula and assign it a value (as a language like JavaScript would allow).

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.