is there a solution how to code the analog of the excel EDATE function in ninox?
let curr_date:=date(2019,1,31)
if I use the following formula for the next_date which is a month later:
next_date = date (year(curr_date), month(curr_date)+1, day(curr_date)) it returns a date in March
Q: in general, how to cope with inequality of day numbers in different calendar months? is there the "EDATE" excel analog function?
10 replies
-
Well.. this is not exact.. but as close as I could get within the alotted timebox. You can keep playing with the logic.. or perhaps others have a better solution ... I do recall support telling me about some hidden functions.. I thought there was a mod type function .. but cannot find it. Also.. my leap year is wrong.. I did not bother to check if it is a century marker year divisable by 100.
-
oops.. This is a bit closer.
-
@Mconneen, the undocumented mod operator is: %
-
@Sean.. I need to keep better notes! Thanks a bunch!!
-
thanks a lot. your idea helped me to understand how to cope with the number of days in months.
I found a solution similar to youth. it works pretty well with negative months as well as with leap years.
-
@Sean. thanks for %, it works
-
@Sean or @Mconneen mod type function? Am I missing something? Can you explain or give an example please?
-
@serik
I like it!
-
@Steven, the modulo operator returns the remainder of a division operation.
13 % 7 = 6
13 % 6 = 1
-
Oh, thanks. @Sean, good to know. @Serik, nice programming.
Content aside
- 4 yrs agoLast active
- 10Replies
- 1444Views