dgratz
April 16, 2025, 6:04pm
1
I am not sure if this is a bug or something that I've configured wrong. I set up a label with an expression binding for the text property:
"<html><center>" +
dateFormat({[System]Gateway/CurrentDateTime}, "h:mm a") + "<br>" +
dateFormat({[System]Gateway/CurrentDateTime}, "MM/DD/YYYY") + "</center>"
However, there is a random zero in the middle of the date when it is displayed (second line should be "04/16/2025").
Is there some strange setting that's causing this, or is this simply a bug?
DD
is day of the year (0 - 365), dd
is day of month
7 Likes
You also want yyyy
not YYYY
:
Time to play 'spot the difference':
startDate = system.date.parse('2024-01-01 00:00:00', 'yyyy-MM-dd HH:mm:ss')
endDate = system.date.parse('2025-01-01 00:00:00', 'yyyy-MM-dd HH:mm:ss')
print system.date.yearsBetween(startDate, endDate)
print system.date.getSecond(startDate) == system.date.getSecond(endDate)
print system.date.getMinute(startDate) == system.date.getMinute(endDate)
print system.date.getHour24(startDate) == system.date.getHour24(endDate)
print 'about to print dayOfMonth...'
print…
6 Likes