Database and Flow
Database and Flow
SQL Script returns datetime or datetime2
datetime2 is unnecessary because it has a higher precision on the milliseconds which is cut-off by the platform anyway.
The returned datetime does not contain an explicit time-zone (no Z, no offset).
The database profile gets the returned datetime without any time-shifting.
Because of the missing time-zone
d.Profile value = SQL response.
By definition the datetime value is UTC!
The database profile always uses Date/Time data type to ensure a normalized data exchange with the SQL script, not relying on any character formating.
Observations
d.INC.DynUpdate:
20230728 142051.525
d.Get Incident:
DateTime2
Character
2023-07-28 14:20:51.5250000
DateTime2
Date/Time
20230728 142051.525
2023-07-28T13:20:51.525Z
datetimeoffset(3)
Character
2023-07-28 14:20:51.525 +00:00
datetimeoffset(3)
Date/Time
20230728 152051.525
2023-07-28T14:20:51.525Z
Boomi Response Comments
1400 is returned - this is 1:1 to what was written, however in the format specified by the DB (→ character type field)
The datetime 1400 that was written to the DB is returned in the well defined Boomi Internal Format. This is what we want!
The datetime is returned with an offset +00 so that the platform could interpret this as UTC. However, because of datatype Character no transformation takes place and we see the DB returned datetime.
The datetime is (internally) returned to the DB connector with an offset +00 so that the platform does interpret this as UTC. The target database profile field type is set to Date/Time, and the platform shifts the returned UTC date (1400) to the ATOM time-zone (+1): 1500 on the profile.
Map to j.Profile comments
In any case, the DB profile DateTime is interpreted as ATOM local and a time-shift will take place.
Surprising to notice that the shift will also take place when using the Date Format function in a mapping.
There is actually no difference between a direct assignment from d.Profile Date/Type to j:Profile DateTime of ‘Z’ type and a date format shape in between.

Mappings
If the target profile specifies a DateTime field of format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
you cannot send a value of 2023-07-28T14:20:51Z
to it (DateTimeZ Script output): Error Formatting Date '2023-07-28T14:20:51Z', Expected Format yyyyMMdd HHmmss.SSS: Unparseable date: "2023-07-28T14:20:51Z"
Database profile datetime data type Character
Cannot use yyyyMMdd HHmmss.SSS
to send it to the DB!
declare @dt as datetime = ? -- '20230728 142051.525'
[22007][241] Conversion failed when converting date and/or time
from character string.
SQL Server requires ISO, in case characters are sent.
Last updated