2001-10-19 15:41:55 vs 2001-10-09 15:41:54 -> (10.0, 240.0, 14400.0, 864001.0)
2001-10-29 15:42:54 vs 2001-10-09 15:41:54 -> (20.0, 480.0, 28801.0, 1728060.0)
2001-10-31 06:00:55 vs 2001-10-09 15:41:54 -> (21.0, 518.0, 31099.0, 1865941.0)
2002-01-01 23:59:59 vs 2001-10-09 15:41:54 -> (84.0, 2024.0, 121458.0, 7287485.0)
2011-01-01 23:59:59 vs 2001-10-09 15:41:54 -> (3371.0, 80912.0, 4854738.0, 291284285.0)
函數 get_dhms 會吃進一個 timedelta
(日數,小時數,分鐘數, 秒數)
Result:🎜
rrreee
🎜The function get_dhms will take in a timedelta (time difference) parameter and return a 4-element tuple which is converted from this 🎜time difference🎜:🎜
rrreee
Current Python version 3.4.3
You can use datetime:
in the standard libraryTest data
data
:data
:結果:
函數
Result:🎜 rrreeeget_dhms
會吃進一個timedelta
🎜The function
get_dhms
will take in atimedelta
(time difference) parameter and return a 4-element tuple which is converted from this 🎜time difference🎜:🎜 rrreeeFor specific format, please refer to the document