سؤال

I have some math calculation and as result I have some minutes as integer. Now I need help to convert this integer to this format hh:mm:ss Trying to do it with datetime but without success.

NUM = 594.15

Expected output of conversion:

9:54:09
هل كانت مفيدة؟

المحلول

import datetime
print datetime.timedelta(minutes=594.15)

should do what you want i think

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top