Jump to content
  • 0

calculation not working


DRAhmed

Question

i have a calculated field like this 

case 
when [@field:follow_checkbox] = 1 and [@field:when_to_follow]  !=(SELECT CONVERT(VARCHAR, CONVERT(DATE, GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'Egypt Standard Time'), 103) AS [Date_Result])
then " yes" 
else " no "
end

 

 

it supposed that if a checkbox is checked and another field date is not equal  todays date ( in format 103 )  it shows yes else no 

but for some reason the calculation doesnt work and it shows no all the time

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @DRAhmed- as I understand, your condition will be, if the checkbox is checked AND the field date IS NOT EQUAL to todays date in 103 format, it should return yes otherwise no. 

can you try this formula? 

CASE WHEN [@field:Send_Email] = 1 AND CONVERT(VARCHAR,[@field:Date_],103) != CONVERT(VARCHAR,SysUTCDateTime(),103)
THEN 'Yes'
ELSE 'No'
END

 

Link to comment
Share on other sites

  • 0
3 hours ago, autonumber said:

Hi @DRAhmed- as I understand, your condition will be, if the checkbox is checked AND the field date IS NOT EQUAL to todays date in 103 format, it should return yes otherwise no. 

can you try this formula? 

CASE WHEN [@field:Send_Email] = 1 AND CONVERT(VARCHAR,[@field:Date_],103) != CONVERT(VARCHAR,SysUTCDateTime(),103)
THEN 'Yes'
ELSE 'No'
END

 

thank you very much )

Link to comment
Share on other sites

  • 0

Hello,

Thank you for the question and solution!

Just to add, the following article lists all available functions that you can use for your Calculated Field and please note that some functions such as SysUTCDateTime() are not available in the Table level's Formula Field: https://howto.caspio.com/function-reference/#:~:text=Date-,SysUTCDateTime(),-Current system timestamp

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...