Sorting date with month as string?

Sorting date with month as string?

xAkademiksxAkademiks Posts: 2Questions: 1Answers: 0

My dates in the table are displayed in this fashion "December 8, 2019". Can someone help me with a way to sort these by date instead of by the string?

Answers

  • xAkademiksxAkademiks Posts: 2Questions: 1Answers: 0

    Nevermind, I actually found a really quick fix. I'll leave it here incase someone else needs it.

    All I did was add a span before the text that is hidden and set it's value to that of a unix timestamp.

    <td><span hidden><?= $nextEventTimestamp ?></span> <?= Date::convertToFormattedDate($nextEventTimestamp); ?></td>
    
This discussion has been closed.