Hi AppSheet users, Can someone assist me with a calculation?
Here’s the scenario: My birthday is August 5, 1997, and today’s date is August 4, 2024. This means there should be 0 days left. However, if today’s date is August 6, 2024, the result should be 365 days left. How can I achieve this in AppSheet? Can someone help me, please? Thank you!
Sample:
Date of Birth: August 5, 1962
Current Date: August 4, 2024
Days Left: 1
Concern: what is the formula of appsheet here?
Date of Birth: August 5, 1962
Current Date: August 6, 2024
Days Left: 365
Please try an expression as follows for a date system of “mm/dd/yyyy”
IF(NUMBER(TEXT([DOB],“MMDD”))>= NUMBER(TEXT(TODAY(),“MMDD”)),
HOUR(DATE(CONCATENATE(TEXT([DOB], “MM/DD”),“/”,YEAR(TODAY())))-TODAY())/24,
HOUR(DATE(CONCATENATE(TEXT([DOB], “MM/DD”),“/”,YEAR(TODAY())+1))-TODAY())/24
)
Please try an expression as follows for a date system of “dd/mm/yyyy”
IF(NUMBER(TEXT([DOB],“MMDD”))>= NUMBER(TEXT(TODAY(),“MMDD”)),
HOUR(DATE(CONCATENATE(TEXT([DOB], “DD/MM”),“/”,YEAR(TODAY())))-TODAY())/24,
HOUR(DATE(CONCATENATE(TEXT([DOB], “DD/MM”),“/”,YEAR(TODAY())+1))-TODAY())/24
)
[DOB] in the above expression is a date type column where date of birth is entered.
1 Like