Automatically Extract the Month in a Text Field From a Date Field in Kissflow Forms
Would you like to retrieve the month from a date field and display it in a text field?
You can compute this with a simple formula.
How does it work?
Sarah, as part of her responsibilities, needs to approve leave requests for her team and conduct quarterly leave data analysis. To facilitate this analysis, she extracts the month from a date field and displays it in a text field using a formula. This allows Sarah to effectively analyze the data and make informed decisions based on monthly reports.
Imagine a form with a date field, Request Date, that auto-populates the date using the 'created' function. To extract the month from this date field and display it in a text field, you can use the following formula:
Requested_Date.toText("mmm") = Jan
This formula efficiently extracts the month from the date field and displays it in a human-readable format, enabling Sarah to conduct her analysis effectively.
You can also extract the day by modifying the formula:
Requested_Date.toText("ddd") = Thu
You can also use this formula with date fields where the date is manually input.
Pro Tip: You can set a default date for a field to show when the form initially loads using this handy formula: date(_created_at.year(), _created_at.month(), _created_at.day())
Read more about the date field here.
suggested a use case for extracting the month from a date field. We now use this simple formula in forms where extracting the month from a date field is necessary. This has proven particularly useful for creating reports that include date and month data.
Content aside
-
1
Likes
- 6 mths agoLast active
- 5Replies
- 169Views
-
4
Following