Facing Issue while taking difference between date and then multiply it by integer value

I want to calculate difference between two dates and multiply it by the Integer value. after taking difference I’m not able to convert datetime value into Double variable.

Hi @Sachin_Jadhav
When u are taking difference between the dates , you had to convert it into either total days or total hours first and then multiply it

see an example below



Nived N

Happy Automation

Can you show me creating a sample workflow below are two dates and then I need to multiply their difference by 24
03/01/2021 14:42:00
03/01/2021 16:51:15

Hi @Sachin_Jadhav

Hi i am doing the following thing here

  1. I am taking two dates and take difference between them and convert the difference in terms of Hours and then converted to double and mutiplied by 24.

(For your case, u can either convert the diiference in terms of TotalDays. Seconds etc…)

(CDBl(CDate(“03/01/2021 14:42:00”).Subtract(CDate(“03/01/2021 16:51:15”)).TotalHours)24).ToString

Thank you solution worked.

1 Like

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