How to Subtract hh:mm:ss:ff with hh:mm:ss:ff

Hi all,
Can someone
Timedif.zip (2.3 KB)
help me to find time differ in hh:mm:ss:ff format.

Var1 START_TIME (DateTime)
Var2 END_TIME (DateTime)

Var3 Execution_Time (timespan)
END_TIME.Subtract(Convert.ToDateTime(START_TIME))

Var4 finaltime string (am converting in string format and displaying) Execution_Time.ToString(“hh:mm:ss:ff”)
Till now is fine.

Now I wanted to Subtract with 00:15:00:00 (Defaulttime) my final time can anyone please help me

Example :
finaltime : 00:10:00:00
Defaulttime: 00:15:00:00
Final result should be : 00:05:00:00
Attached flow please advise.

Hi @Shagoul_Hameed
Here is the sample workflow.
Main (19).xaml (7.3 KB)

Try this and let me know if you face any issues.

Hi Gokul,

thanks for reply but i don’t see any subtraction with my default value

@Shagoul_Hameed

Check below for your reference

reference

Hope this may help you

Thanks

@Shagoul_Hameed Check this below code,
(DateTime.ParseExact(“00:15:00:00”,“HH:mm:ss:ff”, System.Globalization.CultureInfo.InvariantCulture) - DateTime.ParseExact(“00:10:00:00”,“HH:mm:ss:ff”, System.Globalization.CultureInfo.InvariantCulture))

Hope this may help you :slight_smile:

Sorry didn’t worked :frowning:

Hi @Shagoul_Hameed

Try this
SubtractOfTimes.xaml (5.4 KB)

thank you :slight_smile:

when write range this value it’s showing
image
the save value copied to another excel it’s showing
image
i am expecting the same format hh:mm:ss:ff

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