Jump to content
  • 0

DateDiff - Today - Recalculated everyday - solution?




I have a date field (Date1). I would like to compute difference between Date1 and Today() in DAYS and to store the result (DiffDate1)

If Date1<Today() Then 0

Else DiffDate1 = Date1-Today()

Every day, at midnight, the calculation needs to be recomputed.

Caspio provides the following example that doesn't work: Datediff(day,GetUTCDate(),[@field:Date1])

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hello @DoDoTwin,

I would like to infor you that you can use a "Calculated Field" in your Reports DataPages that can get the difference of your Date field and the current date.

Check this documentation, for more information: https://howto.caspio.com/faq/reports-datapages/calculated-fields-and-datediff-function/

I hope this helps.


Link to comment
Share on other sites

  • 0

Hi there!

I think what you need to do here is to setup a Task that will run every day. This is now possible without the use of custom coding.

Setting up the Task would be like this: 


And the logic would be something like this:



You can check out this link for more reference about Scheduled Tasks:



Have a great day!

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.

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.

  • Create New...