I've encountered a small issue that has me stumped - I'm trying to figure out the best solution for it. The problem lies in a table I have, with attributes named "Start" and "End".
My objective is to store every row in an array where the "Start" date matches the current day. To achieve this, I had initially planned to utilize Axios, Sequelize, and PostgreSQL. Here's a snippet of my approach:
axios.get('http://localhost:3030/worktimes/', {
/*
params: {
Start: moment(new Date()) //here I just want to compare the actual date and not Date + Time
}
*/
})
.then(response => {
this.worktimes = response.data.data;
console.log(JSON.stringify(this.worktimes));
})
.catch((error) => {
console.log(error.data);
});
Although I'm using moment.js, I haven't quite cracked how to leverage its capabilities effectively for this scenario. If you're also stumped, my backup plan is to load everything into the array and then trim the time portion from the "datetime" field - but that seems too complex.