Jump to content
  • 0

Check date


wvantongeren

Question

Hi all,

 

I want to check 2 dates for a machine control program.

In my table I have a field "Laatste_visuele_test" thats the last date the machine is checked.

Now I want, in a calculated field,  to know the difference in days :  "To day" - "Laatste_visuele_test"

The result can be + days or - days.

Thanks and greetings from the Netherlands

 

 

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @wvantongeren
 

You can try the code below, just replace the field name below if it is incorrect.

Datediff(day,[@field:Laatste_visuele_test],[@field:Laatste_visuele_test])


I've tested this on my end, and it is working just fine. Please see the screenshots below

http://prntscr.com/mehh20

http://prntscr.com/mehhcl

I hope this helps.

Regards,

TsiBiRu

Link to comment
Share on other sites

  • 0

I think we should use the GetUTCDate() to compute for the difference of the Date to Today's Date?

I guess the formula should go like this instead.

Datediff(day,GetUTCDate(),[@field:Laatste_visuele_test])

We have this documentation in this link: https://howto.caspio.com/function-reference/

But as I checked, GetUTCDate() is not applicable in the Formula DataType inside your table.

 

Have a great day! ;)


-Titania

Link to comment
Share on other sites

  • 0

Hi @wvantongeren,

On 1/30/2019 at 2:51 PM, Scarlet said:

I think we should use the GetUTCDate() to compute for the difference of the Date to Today's Date?

I guess the formula should go like this instead.


Datediff(day,GetUTCDate(),[@field:Laatste_visuele_test])

We have this documentation in this link: https://howto.caspio.com/function-reference/

But as I checked, GetUTCDate() is not applicable in the Formula DataType inside your table.

 

Have a great day! ;)


-Titania

Just to give you an update regarding this, GetUTCDATE function is no longer supported in Calculated Values and Calculated Fields since the last Release 19.0. Use SysUTCDateTime() to get the UTC date. You may refer to this link for other impacted areas last release: https://howto.caspio.com/release-notes/caspio-bridge-19-0/19-0-impacted-areas/

 

-kristina

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