MHDslagelse Posted January 21, 2018 Report Share Posted January 21, 2018 Hi I'm trying to make a formula field showing the week number for a date Using this code Datepart(week,[@field:KampDato]) But it says invalid formula If I change week with year it work ok, but week must work I think. In your onlline help it is supposed to be ok https://howto.caspio.com/function-reference/ Quote Link to comment Share on other sites More sharing options...
1 Vitalikssssss Posted January 22, 2018 Report Share Posted January 22, 2018 Hi MHDslagelse, Please note that Datepart(week) function is not supported in Formula field because it is non- deterministic. You may use the workaround described in this post . Regards, vitalikssssss MHDslagelse 1 Quote Link to comment Share on other sites More sharing options...
0 Kurumi Posted September 29, 2023 Report Share Posted September 29, 2023 Hi - If you would like to show the week number of the year like now (It is currently week 39 in 2023) - this can be done by using calculations. To use it in Calculated Value, you can use this formula: Datepart(week,SysDateTime()) If you would like to display it in the HTML Block (Details Page), you may use a Calculated Field with this formula: Datepart(week,SysDateTime()) - 1 Hope it helps! Quote Link to comment Share on other sites More sharing options...
0 Queso Posted September 30, 2023 Report Share Posted September 30, 2023 Hi, you can also use Triggered Action automation tool to show the week number for a date. The following is an example Triggered Action that automatically updates the Date_WeekNumberInYear with week number on insert of the date: Quote Link to comment Share on other sites More sharing options...
0 NiceDuck Posted October 3, 2023 Report Share Posted October 3, 2023 This will work on Application Tasks too, especially for the records that already exist on your table. Using an application task to update the dates on your table is a common practice since we cannot use a live date function on the table. Quote Link to comment Share on other sites More sharing options...
Question
MHDslagelse
Hi
I'm trying to make a formula field showing the week number for a date
Using this code Datepart(week,[@field:KampDato])
But it says invalid formula
If I change week with year it work ok, but week must work I think.
In your onlline help it is supposed to be ok
https://howto.caspio.com/function-reference/
Link to comment
Share on other sites
4 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.