Any possibility to translate Date Relative ?

It is by default translated to English like “5 days ago” in French should give “Il y a 5 jours.”

I think an option here is to use the fetch API column to pass that to a translation service and return the corresponding translation.

Thank you. I may have asked the wrong question. My user-case is: l want to add a discount info under each product “finishes in x hours”. I created 6 columns. Date begin | date end | math column (for substracting)*24 | ite for singular/plural hours (last condition "hours <0 then minutes | another math column for minutes x24x60 | column template for concatenation. (Can l do that without using api column?)

Everything seems to work except the countdown. First column, even changed to NOW, doesn’t count.

In math column, changing in subtraction formula “Date begin” to NOW gives weird results.

What am l doing wrong?

Can you include screenshots to show how the countdown doesn’t work?

OK, one moment also date relative still in English does not update/refresh.

You all do it right for the math and ITE columns, may I ask why do you need the relative column here if you have constructed all the other ones? I think you can just add another ITE column to have a template for your own language’s “date relative” version.

Because it does not refresh. The same durations are displayed.

The math will update automatically if you subtract NOW from the End Date. Am I understanding correctly that you are currently calculating the difference from the beginning of the promo to the end of the promo? If so, those are static dates, so yes, it won’t update. But, if you change your math to compare the end date to now, then it will constantly calculate and update.

Thanks. Yes this is what I am going to do.

The relative date column is there because i was just trying to see if it update or not.

Thank you. @Jeff_Hager

My mistake was and I advise anyone who use Math Column: Never put the sign “-” in a column title because if you use it in a formula, it is interpreted as a subtraction !!!

Ah, I thought that was part of your math. It’s true that any math symbols in a math formula will be interpreted as math. However, it has nothing to do with your column headings having a ‘-’. The problem was that your replacement values had a ‘-’. Your replacement values can be anything, such as X, Y, or Z, which can be then be replaced with the appropriate column. You are not required to enter the entire heading name in the math formula. You only need abbreviated text that you then replace with the correct column value below the formula.

I see. Good to know. Yes it took by default the replacement and added a third column because “it” thought I was referring to a third column when I wrote:

((Fin-promo) - (now))*24; the formula interpreted as if there was 3 variables: fin, promo, and now. It even changed to ((Fin - promo) - (now))*24.

It should have been written as `((Fin) - (now))*24`

Then you will only have two replacements.

Replace Fin with Fin-Promo and replace Now with Now.

You could even set it up like this:

`(F-N)*24`

and you would just replace F and N with the appropriate values.

I am going to use you method for all computed columns CAPS letters, this is much clearer.

Anyway I did that way…

Also, now refreshes each 10 seconds.

Yes that is correct, time related calculations only update every 10 seconds.

Can you help for the next part of the logic, please?

I have added to the “hours logic” a “minutes logic” see screenshot.

When the hour is less than 1 it will display the number of minutes but the ITE column gives me a decimal number, have you idea how to change that ?

Take a look at this and let me know if you have questions.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.