v8.1.5
I have datetimes coming from a database table using datetime2 in the format:
YYYY-MM-dd HH:mm:ss.xxxxxxx
I’m trying to format the display of this to YYYY-MM-dd E HH:mm:ss
.
I’ve tried both Perspective Format Datetime as well as an expression binding formatDate
with and without toDate(...)
, but all are producing bizarre results.
Binding example:
The formatted dates between the three displayed dates are all completely different with no consistent offsets being applied.
Removing lots of the decimal part and just leaving YYYY-MM-dd HH:mm:ss.xxx
produces different wrong results:
These are my property values:
{
"logged_datetime": "2022-02-14 07:49:17.0000000",
"started_on": "2022-02-14 07:22:37.9670000",
"stopped_on": "2022-02-14 07:29:08.0830000",
}
Another bizarre example below. hat is even going on? All of the datetimes are different depending where you look:
After converting from datetime2
to datetime
, I’m still seeing strange behaviour:
Stopped time is wrong, and not even out by a multiple of 30 mins.
This is the binding showing the raw value and the formatted value:
This is the raw unix time converted into date time which is correct, and different to what the image above shows:
What is going on??