NEED HELP! Date Field in Coding of split/splice/join

I am trying to create a table of dynamic page, On the website i only want to show the Date without time, but the database doesnt hv the option to delete the time, so it just keep showing the date and time on the content.
I have been trying the coding long long time. Doesn’t work at all. Really need help!!!
Really don’t know what i have done wrong. Below is my coding.


// For full API documentation, including code examples, visit http://wix.to/94BuAAs

$w.onReady(function () {
	//TODO: write your page related code here...

  $w("#dynamicDataset").onReady( () => {

const validDate = $w('#text42').text;
const newDate = validDate.split(' ').splice(0, 4).join(' ');
$w('#text42').text = newDate;
});
} );

Attached with some screen capture

Below is my dynamic repeater

Below is my dataset

Hi,
If you are using repeater, you may formate the data using for each item. However, I suggest you change formate, when data input to database.

You also can add hook before insert.

Heson

Hi,

I think the database doesnt allow to change the format input into the database.