wvantongeren Posted January 30, 2019 Report Share Posted January 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
0 TsiBiRu Posted January 30, 2019 Report Share Posted January 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
0 ManokNaPula Posted January 30, 2019 Report Share Posted January 30, 2019 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 Quote Link to comment Share on other sites More sharing options...
0 cheonsa Posted October 7, 2019 Report Share Posted October 7, 2019 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 ManokNaPula 1 Quote Link to comment Share on other sites More sharing options...
Question
wvantongeren
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
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.