1
如何將python datetime對象轉換爲Oracle數字格式。將python datetime轉換成Oracle數字
datetime object:
datetime.datetime(2012, 9, 23, 0, 0)
need to be converted to number in Oracle,
20120923
如何將python datetime對象轉換爲Oracle數字格式。將python datetime轉換成Oracle數字
datetime object:
datetime.datetime(2012, 9, 23, 0, 0)
need to be converted to number in Oracle,
20120923
>>> import datetime
>>> d = datetime.datetime(2012, 9, 23, 0, 0)
>>> d.strftime('%Y%m%d')
'20120923'
>>> int(d.strftime('%Y%m%d'))
20120923