Select to view content in your preferred language

Survey123 Connect If date between statement calculation

138
1
Jump to solution
08-06-2024 12:55 PM
TKSHEP
by
Frequent Contributor

I am looking for help on creating an if date between Jan and March then return 1 value to autofill quarterly text value field.

Any help is greatly appreciated. 

Thank you! 

0 Kudos
1 Solution

Accepted Solutions
Jim-Moore
Esri Regular Contributor

Hi @TKSHEP 

One way to approach this would be to use the format-date() function to get the month as a number. You can then use something like if(${my_month}<=3, 'Q1', 'Q3 - Q4') to return the value you want. For example:

JimMoore_1-1723006842196.png

For more on date formatting, see the Formulas topic in the documentation. 

Hope this helps, Jim

 

View solution in original post

0 Kudos
1 Reply
Jim-Moore
Esri Regular Contributor

Hi @TKSHEP 

One way to approach this would be to use the format-date() function to get the month as a number. You can then use something like if(${my_month}<=3, 'Q1', 'Q3 - Q4') to return the value you want. For example:

JimMoore_1-1723006842196.png

For more on date formatting, see the Formulas topic in the documentation. 

Hope this helps, Jim

 

0 Kudos