Obtain the start and end time of the date range
In the process of building YIDA applications, you may encounter the following problems.
- In the financial reporting and analysis system, enterprises need to generate financial statements according to specific time periods. At this time, a clear start date and end date are helpful to accurately calculate key financial indicators such as income, expenditure and profit.
- In the project management system: during the project planning phase, the project manager usually sets the start and end dates for each phase of the project. Split start and end dates can better track progress, allocate resources, and ensure that tasks are completed on time.
Prerequisites
This tutorial uses the form formula of YIDA. You can first understand the followingForm formula.
Effect
Implementation steps
Create a common form page
Create a common form page. For more information, seeCommon form.
Drag the following components into the canvas area.
- Date range: name it start and end time
- Date: name it start time
- Date: Named end time
Add Form formula
Start time: Select Formula edit by default, and configure the formula shown in the following figure. You can also copy the formula source code directly, and pay attention to modifying the fields.
{"text":"GetArrayItem(起止时间,1)","marks":[{"from":{"line":0,"ch":13,"sticky":null},"to":{"line":0,"ch":19,"sticky":null},"value":"cascadeDateField_lblx9u6p","invalid":false}],"isCmData":true}
End time: Select Formula edit by default, and configure the formula shown in the following figure. You can also copy the formula source code directly, and pay attention to modifying the fields.
{"text":"GetArrayItem(起止时间,2)","marks":[{"from":{"line":0,"ch":13,"sticky":null},"to":{"line":0,"ch":19,"sticky":null},"value":"cascadeDateField_lblx9u6p","invalid":false}],"isCmData":true}
Save page
Try it online
This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
本文档对您是否有帮助?