Suggesting possibility to choose date format in console

Hi,

I haven’t found a place where I could choose the date format in Backendless Console.

It keeps confusing me, because it is using the MM/DD/YYYY format which is not widely used in Europe.

image
In such a case, I which it were day first and month second, as it would avoid mistakes in understanding this as 2nd of August.

So I would suggest this could be set up somewhere. Thanks.

Hi, @Nicolas_REMY

You can use the generated columns to convert the date to a different format. As example :

Concat_ws('/', DAY(Required_Column_Name), MONTH(Required_Column_Name),YEAR(Required_Column_Name))

Result I got in console 12/10/2000

Regards,
Marina

Hi Marina,

Thanks for the suggested workaround. That could be a way to format the data indeed. But I hope there would be plans for something more robust and systematic.

Plus there is a side-effect to this method : that second column is also sent through every API request which does not specify the requested properties - that is quite redundant and not efficient.

For now there is only this option. We will discuss with the team the opportunity of implementing your suggestion.

Regards,
Marina

1 Like

Is there an update on availability of a date formatting function akin to PHP’s? Thanks.

Hi, @Howard_Jacobson .
I would like to clarify, what you are talking about.
As I understood you want the dates in web-console were displayed in a some other formats (by choose), right? I mean in developer web-console , not in ui-builder or any other pages which will be shown to the users of your app.

Hi. My request is that Backendless console data browser AND UI Builder provide a date formatting function like the DATE function in PHP. I understand that Backendless is not written in PHP.

Thanks.

Have you tried the approach I suggested with generated columns?

Yes, I did.

Definitely works, but limiting. For example, users in Europe will want day/month/year but users in the U.S. want month/day/year. Some of our users prefer yyyy-mm-dd. Having a date formatting function allows me to give users their preference. With a generated column, I’d have to have a separate generated column for each format, right? And some of my tables have 4 date columns.

Thanks.

1 Like

If you need a date formatting function, you can apply it in the UI. Data in the database is stored in one neutral format. How you present it to the users is entirely the function of the frontend.

Thank you. I appreciate the clarification. So, then is there a DATE function (like with PHP) that I can use with Codeless in UI Builder?

Hi @Howard_Jacobson

UI Builder is based on JS and supports any browser API, you can find the “Date” category in the Codeless as well as you can use CustomJSCode to display a Date in any format

Ah, OK. Thank you. I appreciate the help. I’m still at the very steep part of the Backendless learning curve.

Are there any examples or tutorials for how to use CustomJSCode?

Hello @Howard_Jacobson,

Please check our Cloud Code with JS documentation.

Totally agree with @Howard_Jacobson on this one. Generated columns could work but are very cumbersome (and redundant) to set up, especially when there are many date columns. Plus it does not allow editing in the console.

The issue here is not with displaying dates to users. It is to display dates in the admin console. And US dates are definitely a no-go for international app admins. MM-DD-YYYY is VERY confusing for dates like March 7th 2023 : it gets confused for July 3rd 2023.

Hello @Nicolas_REMY,

I’ve created a discussion ticket for our team to investigate a possibility to add this feature.

1 Like

Thanks @olhadanylova .

Here’s an easy fix I have thought about : the EU cluster could be set up as DD-MM-YYYY while the US cluster remains with MM-DD-YYYY.