I am trying to create a calculated using the Pre-Defined Function Date Difference using the Current Date as the start date and a column that is a datetime in the end date field.
The error I am getting is:
An exception occured: Invalid DateFormat '2016-01-15'. Expected date format is: MM/dd/yyyy. Please check the SQL syntax and try again.
Is there a way to have the current date cast to the MM/dd/yyyy format?
Thanks in advance.
document.addEventListener('click', function (e) {
const link = e.target.closest('.vote-link');
if (!link) return;
e.preventDefault();
const voteUrl = link.dataset.voteUrl;
fetch(voteUrl, {
method: 'POST',
credentials: 'same-origin'
})
.then(res => {
if (!res.ok) throw new Error('Vote failed');
return res.json();
})
.then(data => {
// update UI
console.log('Vote recorded');
})
.catch(err => {
console.error(err);
});
});