Multiply date with number

HI folks.
Now I’ve searched for an hour, so I come to you for help:

I have a DURATION -column (nuber of days) that I want to multiply with a NUMBER -column (KWH power consumption) to get the total consumation of power. Both values are variable so I cannot put a fixed value in for calculation.
It seems like APPSHEET won’t accept Date-format to multiply with a Nubmer-format in the FORMULA.

Any workaround suggestions?

Solved Solved
0 7 449
1 ACCEPTED SOLUTION

Sorry my typo error, you need to have it like HOUR([Inn1]-[Ut1])/24

View solution in original post

7 REPLIES 7

You need to convert the duration as days… like ([EndDate]-[StartDate])/24. Then it’s a number and you can use it for your calculation.

Simple, but I diddn’t see it. Big thanks!!

You’re welcome

Now I feel stupid, but where does date turn into number…?
I have:
[Date_going out] (Date format) “Date”
[Date_going in] (Date format) “Date”
[No of days] (Duration format) “([Date_going in] -[Date_going out])”
[Power consumption pr day] (Number format) “Generated from equipment choice”
[Total consumption] (Number format) “([Power consumption pr day] * [No of days])”

I tried to change it as you wrote in [No of days]
(? format) “([Date_going in] -[Date_going out])/24”

But still it says " Date arithmetic expression (([Inn1]-[Ut1])/24) has an invalid operator"

Sorry my typo error, you need to have it like HOUR([Inn1]-[Ut1])/24

Now it works:)

Excellent!

Top Labels in this Space