Hello everybody, I am not an expert and I encounter some difficulties with the "datetimeAdd" function.
I have created a customed column which contains an integer (a number of monthes). Let us call this column "My column".
I want to create another customed column which will contain the "current date" + the number of monthes of the previous customed column (ie "My column").
I have tried this syntax : datetimeAdd(now, [My column],"month") and get an error.
I have tried a simplified syntax : datetimeAdd(now, 1,"month"). This works fine (but is of course of no use for me, I don't need Metabase to know which day is tomorrow )
My question is the following :
Is it possible to create a column containing a date which would be : "the current date" + "A value in monthes contained in another column"
Thank you Luiggi,
I think you are perfectly right.
I have read the discussion on GitHub and according to me it is anyway a bug (meaning it is obvious that the possibility to add a column containing a number of monthes (days, years, etc.) to a date (like now) is a real need : for example to compute the date when a stock should be at 0 ).
But I understand (according to the Github discussion) that it is not considered so...
Is there any chance to have this issue solved one day or another? And/or is there any possibility to pass through using a special trick ?
Regards
Bumping this. Is this feature still unavailable? The ability to add a variable amount of time to a datetime field has huge potential in a wide variety of use cases.
For instance, my use case is:
We know, based on the size of a job, how long it should take. The job size to duration ratio has been calculated and can be expressed as a fraction.
If I make a custom column – [Expected Duration] = round([Size of Job] * ratio) – then, something as simple as the following would work:
If you’d like to show support for a feature request, give it a thumbs-up reaction in GitHub. Posting bumps here won’t add any attention to the issue.
EDIT: The exact issue here is this one, but the issue linked above is related.