Jump to content
  • 0

Comparing Date field to constant to assign value


hmsmorgan

Question

Hello--

I'm trying to create a formula that would populate a field based on when an application was submitted. For example, if submitted between Aug 1 and Dec 1, then the field value would be 'Cycle 1'

I was thinking I could use a formula, but I', not getting it to work how I imagine...

CASE
WHEN [@field:Date_Created_in_Caspio]  >= '01/08/2020' AND <= '01/12/2020'
THEN 'Cycle 1'
END

Thanks for any help!

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello @hmsmorgan,

If you use this statement in the Formula field in the table, please try this formula:

CASE
WHEN  [@field:Date_Created_in_Caspio] BETWEEN CONVERT(datetime, '01/08/2020', 101) AND CONVERT(datetime, '01/12/2020', 101)
THEN 'Cycle 1'
END

 

This should work if the  [@field:Date_Created_in_Caspio] field has Date/Time or Timestamp DataType.

Please note that the BETWEEN operator is inclusive: begin and end values are included.

Hope this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...