Jump to content
  • 0

DateDiff - Today - Recalculated everyday - solution?


DoDoTwin

Question

Hello,

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.

~WatashiJin~

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: 

download.png.00be3361d7167e4644592bafea5a505c.png

And the logic would be something like this:

Screenshot_4.png.c6b947a38b20f46561df0214748bb972.png

 

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

https://howto.caspio.com/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.

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