How to make if compare number of data from java script

Your JavaScript can be reduced to a single line:

return new Date().getDate();

However, that still won’t help you as the JavaScript column returns a string, which can’t be used in a numerical comparison.

A better approach here is to use a Math column with the following formula: Day(Now), where Now is the current date/time. This will return a number, which can be used directly in your if-then-else column.

1 Like