Date & Time Picker Formatted as Days Not Allowing Calculation

I am pretty to new to bubble, trying to feel my way around but this one I cannot seem to find a work around. I used the dynamic data option to calculate the amount of days between date & Time picker A & B, and I also formatted it as days.
when I go to calculate the days x Rate in a text box, it doesn’t show value it shows Height & Weight.

Screen shots below

with the results from that equation I get numbers. when I go to do simple multiplication and/or addition I.E $2,500x5 days… it doesn’t allow me to add the the “text rent duration” value, instead it is giving the option height or width. See screenshot below:

Overall I just do not know how to do the calculation with the days and the rate and to actually get it displaying the results and not just the equation. Any assistance will be much appreciated. Thanks in advance.

2 Likes

I have the same issue in another app. I didn’t even manage to calculate the days counter between datepicker A and B. But I need that exactly to do the same thing as you are doing, so that I can use to multiply a valeu by the number of the days, without necessarily insert new useless column to the database.

1 Like

You can’t reference a text’s value elsewhere - so you’ll need to refer to the same original value in your calculation (i.e. Date/time picker B’s value - Date/time picker As value Format as Days)… note: you’ll need to use parenthesis to make that work correctly…

Alternatively store that value in a custom state somewhere, then you can refer to the custom state value and multiply that by the price per day.

1 Like

When your reference the Text “rent duration” you are referencing the element itself, not it’s value or content, that’s why you can only access it’s properties (width/height).
So the correct expression would be “Date/TimePicker B’s value - Date/TimePicker A’s value:format as days * Parent group’s Renters’s Price Per Day”

1 Like

Hey Adrian, thank you for you response. I try this and it worked for one of the sections that I had. I truly appreciate your response. Thanks for your help. :grinning:

1 Like

Hey Adam, thank you very much for your response. I am going to try this with another equation that I have to calculate as there are quite a few, this seems complex (for me, being that I just started), but I am going to give a go until I figure it out. Thanks again.

This topic was automatically closed after 70 days. New replies are no longer allowed.