Jump to content
  • 0

problem with GetUTCDate in age calculation


qrmds

Question

I am using the code below in a field of type formula but I'm getting an 'invalid formula' error.

Datediff(year,[@field:DOB],GetUTCDate())

Am I using the right way to get the current date?
I must be doing something wrong but I can't figure out what.
Your help is much appreciated.


Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @qrmds,

Unfortunately, the GetUTCDate() function is not available in the Formula field.

You may find this information is this article https://howto.caspio.com/tables-and-views/data-types/formula-fields/

7v2Fq2i.png

As a workaround, you may use the Application Task to calculate the DateDiff if this feature is available in your plan. 

The Task example:

image.png.4d8acd86dba4578bb2dfcefd62702bbd.png

You may learn more about the Tasks in this article https://howto.caspio.com/tasks/

If you need to recalculate the age every year, it is possible to run the Task on 01/01 to get the relevant age.

Hope this helps.

Link to comment
Share on other sites

  • 0

Hi! Just to add to the most recent comment, I suggest going through their How-To article about Triggered Action to know more about how we can use and when it's beneficial to use it. 

How-To Article: https://howto.caspio.com/tables-and-views/triggered-actions/

Webinar: https://www.caspio.com/webinars/introduction-to-triggered-actions/

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