{QueueItem}.LastProcessingOn conversion (Studio 2020.10.7)

Hello All,

I am doing an automation that must send a summary email to stakeholders after queue processing is finished. I’m running into the same issue that was faced in this thread:

I believe the “LastProcessingOn” function for queue items was fixed, however I am running into a formatting issue. LastProcessingOn outputs the time in UTC (Orchestrator set to use UTC), but I need to convert the time to a different zone (EST to be specific). I cannot change the Orchestrator time zone so that is not an option. Is there any way to convert the output?

I know the output can be split up then the time can be individually converted, but then I would run into an issue where I would need to ensure the date was also updated accordingly if the time conversion were to result in a different date. Any help or suggestions are welcome. Thank you.


You can convert using this below expression…this gives in date format if you want in string add .ToString

TimeZoneInfo.ConvertTimeFromUtc(Cdate(quitemvar.LastProcessingOn),TimeZoneInfo.FindSystemTimeZoneById("Eastern Satndard Time"))

If string format is needed then

TimeZoneInfo.ConvertTimeFromUtc(Cdate(quitemvar.LastProcessingOn),TimeZoneInfo.FindSystemTimeZoneById("Eastern Satndard Time")).ToString("MM/dd/yyyy hh:mm:ss")

Use any format in ToString as you need

Hope this helps


@Anil_G Thank you so much for the help, this is exactly what I was looking for! I was close, just didn’t realize I was missing/needed the “Cdate” portion of the code.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.