I'm new to SQL. I made an SQL query, but I do not know a correct date format that I wish to use. I have syntax errors, that I can't show right now. Thanks very much for any assistance.
const getWhere = () => {
const whereCondition = `"Report"."statusId" IN (${statusIds})
${params.startDate ? `AND "Report"."createdAt" >= DATE(${moment(params.startDate).format('YYYY-MM-DD')})` : ''}
${params.endDate ? `AND "Report"."createdAt" <= DATE(${moment(params.endDate).format('YYYY-MM-DD')})` : ''}`
return whereCondition;
}