Trouble using datetime_format

I am using the example from the TG website:

PRINT start[datetime_format(start.postTime, “a message was posted at %H:%M:%S on %Y/%m/%d”) as postTimeMsg];

I believe I am doing everything correctly, and yet I get this error:


1 Like

Hopefully its not an issue with the DATETIME value being an ACCUM rather than an attribute on the vertex. If datetime_format doesnt handle accumulators, that would be very limiting in its usability.

Hi Mark,

I believe you are referring to datetime_format function. This is a known issue that we are improving.

I am checking is is there a workaround for this. Please stay tuned.


Please see if workaround below works for you.

to_string(year(dt)) + “-” + to_string(month(dt)) + “-” + to_string(day(dt) + " " + to_string(hour(dt)) + “:” + to_string(minute(dt)) + “:” to_string(second(dt))

1 Like