Is there a method to get the first date of the current month? I haven’t been able to find an answer to this relatively simple question.
What I need it for: together with a day of the month that the user submits in a form (and is stored in the user collection), I want to be able to calculate a date. For instance, if the user submits day ‘21’, I want to add this number (minus 1) in a formula to the first date of the current month, which should result in the date 21 January 2023.
Perhaps there is an easier way to archieve this, but to me this seems to be most straightforward method.
It’s not possible to do it in Adalo. You need to use an API or a custom component to add this functionality into your app. I created a component to do something very similar for one of my apps but an API would also work. You can let me know if you get stuck on this and I can help you by adjusting the component to get the first date of the current month and sharing it with you or to create an API which would return the date you want.
If you’re looking to just get the day number, you can do it by adding a hidden input with a default value of the date that was entered. Then adjust the date format to the day number. Last, use that input to update the day number in the collection.
Welcome to the community
Need like this? And if it is 1 or 2?
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.