Pls. Help I need to add a decimal value like 3.54332 or 0.42326 to a time of 19:00 or 1:00 with format of "HH:MM:SS" with 3 being the minutes and the decimal is the seconds. Pls Help friends

Pls send Help friends

try this
dateValue.ToString(“MM/dd/yyyy hh:mm:ss.fff tt”));
Date and Time with Milliseconds: 07/16/2008 08:32:45.126 AM
dateValue.ToString(“s.ffff”));
45.1800 seconds

hi @Watashu

Welcome to Forum

In the below link you will get all the Formats

As per your requirement just put it into DateTimeVariable.ToString(FormatYouWant)

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

@Watashu

Use this

TimeSpan.FromMinutes(CDbl(“3.54332”))

If you want to fetch Minutes use TimeSpan.FromMinutes(CDbl("3.54332")).Minutes
for seconds TimeSpan.FromMinutes(CDbl("3.54332")).Seconds

Thank you guys, also how can I round off a variable(with a decimal value like 3.4343) to a whole number then add it to the minutes?

Hi @Watashu

Math.Round(ValueYouWantToRoundOff)

Mark as solution and like it :slight_smile:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like