A format of YYYY-MM-dd HH:mm:ss:SSS
returns the days as We
, Fr
, instead of 06
, 01
. If I change the day to DD
I get the day in month. This contradicts the docs, see link below. Is this a bug, or just something I am overlooking?

https://docs.inductiveautomation.com/display/DOC81/Data+Type+Formatting+Reference
Where exactly are you entering that format? It's not clear from your title.
It seems likely that you're passing a format string directly to a frontend component, which by definition can't use the same datetime formatting used on the backend; instead it uses Moment:
https://momentjs.com/docs/#/displaying/format/
I was using the dateFormat
property on the table(s).
We have a requirement to use a specific date format and use a "global" definition, so from what you mention, that's not going to happen since some components use a different type of format?
You can achieve the exact same output formatting in both Perspective "frontend" and "everywhere else in Ignition" contexts; you cannot (always) do so using the exact same format pattern in both contexts.
You could just have a session property string that you bind all your tables' dateFormat
to?
2 Likes
Please correct me if I'm wrong, but any component that uses/has a property dateFormat
will use Moment whereas anything that doesn't and uses a system function like system.date.format
will use this formatting.
2 Likes
More pedantically:
Any date/time formatting operation done on the frontend, i.e. within the component itself, will be using Moment.
Any date/time formatting operation done on the backend, including bindings, scripts, expressions, etc, will be using Java's formatting utilities.
2 Likes