Vinicius Carvalho
07/21/2022, 10:10 PMSELECT date(extract_created_at)
FROM payment_gateway_extracts
WHERE client_id = ${clientId}
GROUP BY date(extract_created_at)
ORDER BY date(extract_created_at) DESC
OFFSET ${skip}
LIMIT ${take}
``;`jdkdev
07/22/2022, 3:16 AMjdkdev
07/22/2022, 3:21 AMconst groupedDates = await prisma.paymentGateWayExtracts.groupBy({
by: ['extract_created_at'],
where: {
clientId: ?
},
orderBy: {
extract_created_at: 'desc',
},
take: ?,
skip ?
})
jdkdev
07/22/2022, 3:22 AMNurul
07/22/2022, 6:57 AMVinicius Carvalho
07/22/2022, 5:16 PM[
{ date: '2022-07-21' },
{ date: '2022-07-20' },
{ date: '2022-07-11' },
{ date: '2022-07-10' }
]
e.g with code jdkdev
[
{ date: 'Thu, 21 Jul 2022 16:54:21 GMT' },
{ date: 'Thu, 21 Jul 2022 16:49:08 GMT' },
{ date: 'Thu, 21 Jul 2022 16:18:06 GMT' },
{ date: 'Thu, 21 Jul 2022 14:07:38 GMT' }
]
even if you make a map and use with UTC the values are differentjdkdev
07/22/2022, 8:23 PMjdkdev
07/22/2022, 8:24 PMVinicius Carvalho
07/23/2022, 12:16 AM