Displaying Long Date Format in a Table

Hi, I am showing a Fixtures Table on my site and connected it to a table dataset. I have a Date and Time field but I only want to display the Long Date format like this:

May 01, 2021, 8:45 PM

But it is currently showing the full date and time like this and I can’t find a way to change it.

Sat May 01 2021 20:45:00 GMT +0100
(British Summer Time)

Any help would be appreciated.

Thanks

Martin

Hi, I still need to do this, can anybody help at all please?

Thanks

did you get a response? I too have an issue with a TABLE - NOT a TEXT BOX in formatting the date. The response I got does not work as it assumes it is a text box, a table cannot use “… .text” in the code example:

$w . onReady ( function () {
// Get the date from the date field of the current item
const date = $w ( “#dataset1” ). getCurrentItem (). date ;
// Set the text element to display the date using the user’s settings
$w ( “#resultsTable” ). text = date . toLocaleDateString ()
const options = {
day : “numeric” ,
month : “short” ,
year : “numeric”
};
// Sets the property of the text element to be a string representing today’s date in US English
$w ( “#resultsTable” ). text = today . toLocaleDateString ( “en-GB” , options );