反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Take the last day of the month under the current date

  • Recent Updates: April 14, 2022
  • 1 Overview

    1.1 Expected effect

    Sometimes users need to get the data of the last day of each month. For example, it is necessary to calculate the last day of each "PurchaseDate", as shown in the following figure:

    5.png

    1.2 Implementation ideas

    Use the DATE function in combination with YEAR, MONTH and other functions.

    2. Operation steps

    The example uses the "FRDemo_EquipmentDetail" under "FRDemo".

    2.1 Create a self-service dataset

    Create a new self-service dataset, click "selected field>FRDemo_EquipmentDetail", select some fields in the table, as shown in the following figure:

    1.png

    2.2 Calculate the last day of each month

    Click "+" to add a New column, as shown in the figure below:

    2.png

    Name the new column "Take the last day of the month under the current date" and enter the formula DATE (YEAR (PurchaseDate), MONTH (PurchaseDate) +1, 1-1). Click "OK", as shown in the figure below:

    3.png

    Note: The functions and fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.

    Formula description:

    FormulaInstruction
    YEAR (PurchaseDate)Return the year of the purchase date
    MONTH (PurchaseDate)+1Return one month after purchase date
    DATE (YEAR (PurchaseDate), MONTH (PurchaseDate) +1, 1-1)Return the date of the last day of the month of purchase date

    You can continue the calculation or save the self-service dataset.

    2.3 Effect view

    See section 1.1 of this article for details.

    3. Matters needing attention

    If you need to calculate the last day of the month of "current time", you can combine  TODAY and DAYSOFMONTH functions. Input formula DATE(YEAR(TODAY()),MONTH(TODAY()),DAYSOFMONTH(TODAY())). As shown below:

    4.png

    Formula description:

    FormulaInstruction
    YEAR(TODAY())Return the year corresponding to the current time
    MONTH(TODAY())Return the month corresponding to the current time
    DAYSOFMONTH(TODAY())corresponding to the current time
    DATE(YEAR(TODAY()),MONTH(TODAY()),DAYSOFMONTH(TODAY()))Return the last day of the month of "current time"


    Attachment List


    Theme: Data Processing
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭