Need to populate the start and end time of a particular action.

MirzaSaquiB
Tera Contributor

HI Experts,

 

I am getting the issue in fetching the start, end time and the difference between that time.

I am creating a flow variable and adding the script to get the start time. Then after there is a powershall action, I add the script step to get the completed time of that action and use it as end time.

Now the start and end time is showing correctly on the form Where i need that value. but in the XML, format and time is different.

 

Also unable to calculate time difference.

 

MirzaSaquiB_0-1783506000833.png

 

 

 

Thanks & Regards

Mirza Saquib Beg

2 REPLIES 2

Ehab Pilloor
Mega Sage

Hi @MirzaSaquiB,

 

Date/time values are stored in the database in UTC (Coordinated Universal Time), so that's what you'll see when you open XML. XML gives you the value from the database. This is (one reason, anyway) so that if one user exports to XML, and another user in a different time zone imports the file, the actual value in the database doesn't change.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards,

Ehab Pilloor

 

Ankur Bawiskar
Tera Patron

@MirzaSaquiB 

I agree with what @Ehab Pilloor mentioned

You can compare the date/time in XML and verify

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader