Sort elements by Time

Hello everyone!

I have a question about sorting auctions by date. I am using the Time type, and the time format is yyyy:mm:dd:hh:mm
. When I try to sort by today’s date using, it returns the format yyyy:mm:dd:hh:mm
and compares up to the yyyy:mm:dd:hh:mm. However, I need to compare only the day(yyyy:mm:dd) and retrieve only today’s auctions. How can I do this in motoko?

for (auction in a) {
for (auction1 in a) {
if ( > {
id :=;

        if(auction.createdAt =={
let auction = findAuction(id);
// let bidHistory = List.toArray(List.reverse(auction.bidHistory));
{ item = auction.item; bidHistory = auction.bidHistory; createdAt = auction.createdAt};

This motoko datetime library might be helpful