This site requires JavaScript to be enabled
IE BUMPER

Logo

Dear Tricentis qTest users,

If you would like to submit a Tricentis qTest ticket,

please use this support request form.

Tosca Version
IncidentLookup using list
Language
How can we help?

Solution Suggestions

Please enter your question to get suggestions.
  Help
IE BUMPER
Categories
Boolean Operators
OR or vertical bar symbol (|)
Finds a match if either the terms exist in a document (a union using sets).
AND
Finds a match if both terms exist in a document (an intersection of sets).
NOT, minus (-), or exclamation point (!)
Excludes documents that contain the term after NOT (a difference of sets).
Wildcards
Asterisk (*)
The asterisk symbol performs a multi character wildcard search.
Percent sign (%)
The percent sign performs a single character wildcard search.
Phrases
Quotation marks (")
Use quotation marks to search for an exact phrase with multiple terms.
For examples and more information look at our Knowledge Base: Advanced Search On The Support Portal

Get Difference between two date time in Hours:Minutes:Second with or without excel installed

This article describes how to get the difference between two Date time (dd MM yy Hours:Minutes:Second) in format "Hours:Minutes:Second" with CALC function and without using CALC.


Situation

There can be a scenario where you want to find out the difference between DATE TIME in "Hours:Minutes:Second" format.

Date 1 = 13 Dec 2017 15:37:37

Date 2 = 14 Dec 2017 14:37:00

Result = 22:59:23

Solution

1) When excel is installed - We can use CALC function like below and find the difference demonstrated below-

 

{CALC[TEXT(""""{B[Date 2]}""""-""""{B[Date 1]}"""","""[h]:mm""")]}

 

2)When Excel is not installed -  We can achieve this scenario using PowerShell using the following commands (We cannot use CALC  function as Excel is not installed)

 

$EndDate=[datetime]'{B[Date 2]}'

$StartDate=[datetime]'{B[Date 1]}'

$s = (NEW-TIMESPAN –Start $StartDate –End $EndDate).TotalSeconds

$ts =  [timespan]::fromseconds($s)

$str = $ts.ToString('"hh\:mm\:ss\,fff"')

$str | clip

exit 0

 

Screenshot-

- Attached Subset for reference

 

[opt.] Reference

 

Attachments
IE BUMPER

Tosca is the perfect solution

Optimize - Manage - Automate

Download Trial