通過python獲取微秒時間

import datetime
import time


print time.time()
hello = datetime.datetime.now()
print hello

s=datetime.datetime(hello.year,hello.month,hello.day,hello.hour,hello.minute,hello.second)  
print time.mktime(s.timetuple())

 

結果:

1300026963.33
2011-03-13 22:36:03.348000
1300026963.0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章