New Formula Please: DatedIF()

Hey everyone

Let’s say I want to show length of time that something has been whatever,

and I want to show that in the following format:

  • 1 years, 4 months, 16 days

In excel, we have =DATEDIF() that we can use - which results in a nice and efficient formula:

=DATEDIF(G6,H6,“y”)&" years, "
&DATEDIF(G6,H6,“ym”)&" months, "
&H6-DATE(YEAR(H6),MONTH(H6),1)&" days"

But if I want to accomplish this in AppSheet… well, just take a look at this thread.

It seems to me all this would be simpler, along with some other date-related display troubles, from the addition of the DatedIF() formula.

As always, thanks for considering. partyparrot (Appsheet)

+1 for this request

and it also needs some formulas like a date formula that calculates the difference between two dates, which needs to be done in one step. I will add the necessary formulas under this request.

1 Like

Why? What’s wrong with the current way?

(HOUR(date2 - date1) / 24)

Dear @Steve , thank you very much for your answer.

I know the use of the above formula.

When I first needed to calculate the number of days between two dates, I learned this use on the form and by reading your articles. The form contains examples of this use. I know that.

But this is a bit of a forced method.

When Google Spreadsheets Excel came out as a competitor, it introduced many functions of Excel as they were.

So people switched from Excel to Google Spreadsheets without learning anything new.

Many things that are known to be done in Excel and SQL can also be done to AppSheet.

For example, the function between two dates is generally used as follows.

Sql: DATEDIFF (DAY, ‘19900101’, ‘20201229’)
Delphi: DaysBetween (D1, D2)
Excel 2013 and later: Days (D1, D2) or DATEDIF (Start_date, End_date, “D”)
PHP: date_diff ( datetime1, datetime2);
Python: Variable = d1 - d2
Google Spreadsheet: Minus (D1-D2) or DATEDIF (d1, d2, ”D”)
or other programming languages, using similar functions.

I only see Powers app as a competitor to Appsheet. Others are just babies.

Appsheet, If Microsoft is going to be a competitor, it should definitely standardize its functions. So let’s use these functions based on our previous knowledge and feelings. Let’s not do research. Let’s not learn a new method.

You may not think like me.

I hope that what I mean is understood.