Date time picker format

Good day,

In UI Builder i have a date time picker with custom format and Date Only Picker Mode.
image

In the table the result will give the date the user has selected, but it will also show the time the user has selected that date. The field is a datetime field.

image

Is it possible to get only the date in this field? Or is there a way to always set the time to 12:00:00.
I am reformatting this date into another format so the user sees the date only.
But when the user is registering in the night till 01.00 the result shows the date minus one day.

@Michel_Loriaux ,

To clarify situation.
Could you please check what timestamp stored in the database by retrieving the record using “REST Console” in “Data Service” section?

Regards, Andriy

See the below result:
image

You can set the time element in your logic. By default, the system will assign the current time (on the UI side).

Regarding the following:

Does the data show minus one day in the database or in your UI?

Mark

Hi Mark,

This is what happens, in the first line the user has selected may 20th 2022 but he did it at 00:07:00.
Then it shows in the second column the day before. The three last registrations are OK because they are before 00:00

image
image

I do have a time add formula in the second column but i needed to do this to get the correct date in the second column:
image

How would i set the time element in my logic in the date time picker?

Hello @Michel_Loriaux

I’m trying to understand the main idea.
So, the question is with displaying a date in the DataBrowser?
In your formula, you’ve got 1 hour, what’s the purpose for that?
Have you tried to modify the date(timestamp) in the On Change Event for the DateTimePicker?

Btw, when you keep the date in the Datetime column it stores as a timestamp (including hours/minutes/seconds/milliseconds) and the same timestamp will look different for different time zones, for instance 00:00:00 in the EU is today, but in the US it’s yesterday

Correct, i am using the second column in order to be able to show it in a Data Table in the correct formatting.
image
The one hour time difference i added because of many incorrect dates in this field.

Can you explain how i can modify the date(timestamp) in the On Change Event for the DateTimePicker?

It depends on the format you need it in, here’s the simplest way:
UI Builder - ConsoleDemo - Backendless 2022-05-24 14-42-28