I have a database with plenty of ‘zero’ dates in it like this
0000-00-00 00:00:00 and like
When I come to format dates, any that are ‘zero’ come out as
Mon 1 Jan 1900 at 12:00 am for instance. In these cases I would rather not have a date showing but instead put some text/explanation.
If I try a ternary operation, what is the correct way to reference a ‘zero’ date?
The following works BUT not for 0000-00-00, so therefore I must know how the date is formatted in the DB.
dmx-bind:value="serverConnect.data.serverAction.data_modified == '0000-00-00 00:00:00' ? 'No date entered' : serverConnect.data.serverAction.data_modified.formatDate("ddd d MMM yyyy")"
I suppose I could set the comparison date as less than
Mon 1 Jan 1900 at 12:00 am,
Hope this makes sense.
Any thoughts from anybody?