InsightConnect - Datetime manipulation

I’m using advanced regex to extract a date and time from an email. I need to compare the extracted date time against the current date time.

The issue I’m currently running into is that the date/time extracted from the email is of format 2/26/2024 2:59:21 where the date/time produced by the DateTime plugin is of format 2024-02-26T22:58:14.0Z.

How can I convert the date/time extracted from the email to the same format so I can get the difference? Is there an easy way to achieve this?

Are you trying to get Current Date Time, and them compare that against the time that you retrieve from the email? When you say compare, what exactly are you doing with them?

I’d like to get the difference in minutes between the current date time and the time extracted from the email.

I’m using the Time Elapsed action from the DateTime plugin. However, as stated perviously the date time extracted from the email is of format 2/26/2024 2:59:21 (this is PM EST) and the date time generated from the ‘Get DateTime’ action are of different formats so the difference (in minutes) between the two is off.

You can format the get date time however you like. Here is an example that I think works for you. You just have to decide if you want 24 hour time or 12 hour.