=DAY(date)
=DAY(A1)
The DAY function is used to extract the day number from a date and display it in a cell. For example this formula would extract the day number from the date in cell A1 and display it in the cell in which the formula is entered.
=DATE(2020,MONTH(A1),DAY(A1))
The DAY function can also be used to feed the day value into the DATE function to change the year of a date, but leaving the month and day as-is. For example, this formula would feed the day value from cell A1 into the DATE function, which would then change the year to 2020, but keep the month and day unchanged.
=DAY(A2)-DAY(A1)
The DAY function can also be used to calculate the number of days between two dates. This example would calculate the number of days between the dates stored in cells A1 and A2.
=DAY(A2)-DAY(A1)/30
The DAY function can also be used to calculate the number of months between two dates. For example this would calculate the number of months between the dates stored in cells A1 and A2.
The DAY function in Sourcetable allows users to return the day of the date entered as a number. It requires an argument of a date, which should be entered using the DATE function, as Sourcetable calculates dates using sequential serial numbers.