Substrat Integer from Date

Hi all,

I ran into a slightly awkward problem and hope that someone can help me.

I would like to show the remaining days of an offer as shown below.

If I deduct the 30 before the dates, bubble doesn’t get that the 30 should be part of the calculation.
image

If I deduct the 30 after the dates, bubble understands that it’s part of the calculation. But then the remaining days value is negative. (-29 days remaining for example)
image

Does anyone know how I can either use the 30 in the front (with no JS if possible), or how I can reverse the - to + value in the second example?

Best regards,
Philipp

You could multiply by -1 to flip the sign.

I didn’t see the forest due to the trees… You’re absolutely right. Thanks a lot for your quick response to my question! :slight_smile:

1 Like

It’s my pleasure! Once upon a time I was stumped by a similar issue and Gaby Román @romanmg kindly spelled out the very obvious solution for me :sweat_smile:

1 Like

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