How do I obtain the quarter of the date?
1. Usage scenarios
Some enterprises assess employees' performance on a quarterly basis, so how can we automatically obtain the current quarter according to the current time when filling in the performance appraisal?
2. Video Display
3. Procedure
3.1 drag the date component and a single line of text to the form page
Form page
3.2 name a single line of text quarterly and configure a formula
Select formula Edit
(1) edit the formula and configure to automatically obtain the quarter according to the date
Formula logic:Use the MOUTH() formula to obtain the month of the date, and use the IF formula to judge;
When 1<= month <= 3, the return value is "first quarter";
When 4<= month <= 6, the return value is "second quarter";
When 7<= month <= 9, the return value is "third quarter";
When 10<= month <= 12, the return value is "fourth quarter".
The formula configuration is shown in the following figure:
The formula code is as follows, which can be directly copied to the input box of formula editing:
{"text":"IF(AND(GE(MONTH(DATE(日期)),1),LE(MONTH(DATE(日期)),3)),\"第一季度\",IF(AND(GE(MONTH(DATE(日期)),4),LE(MONTH(DATE(日期)),6)),\"第二季度\",IF(AND(GE(MONTH(DATE(日期)),7),LE(MONTH(DATE(日期)),9)),\"第三季度\",\"第四季度\")))","marks":[{"from":{"line":0,"ch":21,"sticky":null},"to":{"line":0,"ch":25,"sticky":null},"value":"dateField_kquda4th","invalid":false},{"from":{"line":0,"ch":45,"sticky":null},"to":{"line":0,"ch":49,"sticky":null},"value":"dateField_kquda4th","invalid":false},{"from":{"line":0,"ch":84,"sticky":null},"to":{"line":0,"ch":88,"sticky":null},"value":"dateField_kquda4th","invalid":false},{"from":{"line":0,"ch":108,"sticky":null},"to":{"line":0,"ch":112,"sticky":null},"value":"dateField_kquda4th","invalid":false},{"from":{"line":0,"ch":147,"sticky":null},"to":{"line":0,"ch":151,"sticky":null},"value":"dateField_kquda4th","invalid":false},{"from":{"line":0,"ch":171,"sticky":null},"to":{"line":0,"ch":175,"sticky":null},"value":"dateField_kquda4th","invalid":false}],"isCmData":true}
3.3 implementation effect
4. Try it online
https://www.aliwork.com/bench/coe? tplUuid=TPL_TQX0PJO4YM2FM2WXWZB8
YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!
-------------------- Get the latest information YIDA, welcome to follow US--------------------