I have a date field in my app and I want to get month from the date field, is there any way to get month of the selected date field?
Hi Neils, to get month from the date field (control), you need to use DronaHQ Studio’s custom formula - DATESTR(<control unique name>, <format>)
,
where the control unique name
is the Date control’s unique name,
and format
should be either of "Mo", "M", "MM", "MMM" or "MMMM"
.
For example, to use this formula, you should have two controls - one being a Date control and another say Text box where you can see the desired Month of the select date.
Let the Date control’s unique name be - datepicker
. Now bind using control’s reference of the Date control to Text control using formula - DATESTR(datepicker, "MMMM")
and click on Save and Validate button on Text control and preview your app. On app preview, select a date, say Jan-26-2019, the output in Text control will be January.
Refer the attached image to see how to use the formula using control’s reference.