To generate a UTC timestamp in the format of yyyy-MM-dd'T'HH:mm:ss.SSS, you can use either of the following expression that might give you the desired output format with the T separator.
concat(
toString(toUTC(currentTimestamp(), 'yyyy-MM-dd')),
'T',
toString(toUTC(currentTimestamp(), 'HH:mm:ss.SSS'))
)
Adding and Subtracting Time: For adding or subtracting time, you can still use the addToTime() and subtractFromTime() functions.
Subtract 1 day:
concat(
toString(toUTC(subtractFromTime(currentTimestamp(), 1, 'Day'), 'yyyy-MM-dd')),
'T',
toString(toUTC(subtractFromTime(currentTimestamp(), 1, 'Day'), 'HH:mm:ss.SSS'))
)
Add 1 hour:
concat(
toString(toUTC(addToTime(currentTimestamp(), 1, 'Hour'), 'yyyy-MM-dd')),
'T',
toString(toUTC(addToTime(currentTimestamp(), 1, 'Hour'), 'HH:mm:ss.SSS'))
)
These expressions should help you achieve the desired format with the T character included.
I hope this information helps.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.