< DateTime Conversion>can anyone help with arstrStyles >> how to declare this variable?

Continuing the discussion from How to convert total time into hours:

I want to convert minutes into number of hours.

strTime = (DateTime.ParseExact(strTotalTime, arstrFormats, CultureInfo.InvariantCulture, DateTimeStyles.None)-Now.Date).TotalHours.ToString

Hi @anjasing

Try the below syntax. Meanwhile a input will help me.

strTime = (DateTime.ParseExact(strTotalTime, arstrFormats, CultureInfo.InvariantCulture, DateTimeStyles.None) - Now).TotalHours.ToString

Regards

Hi @anjasing ,

Check this :slight_smile:

Thanks,

1 Like

1861 are the minutes I want to convert in hour

Hi @anjasing ,

divide by 60

if you want roundup

image

Thanks,

Hi @anjasing

Try this:

(1861 / 60).ToString

Regards

Hi @anjasing

Check this:

Assign-> totalMinutes = 1861     (DataType: System.Int32)

Assign-> hours = totalMinutes / 60             (DataType: System.Double)


Regards

I want roundup and also the output in string variable. Please help

Hi @anjasing

Try this:

Math.Ceiling(1861 / 60).ToString


Regards

1 Like

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