'Tue Jul 03 15:21:13 2007' 怎样得到YYYY-MM_DD

'Tue Jul 03 15:21:13 2007' 怎样得到YYYY-MM_DD

import os,time,stat
fileStats = os.stat('c://11.xml')
time.ctime(fileStats.st_ctime)
'Tue Jul 03 15:21:13 2007'

time.ctime 能返回文件的创建日期,我现在怎么做可以得到yyyy-mm-dd格式,
谢谢
t = 'Tue Jul 03 15:21:13 2007'
newDate = time.strptime(t, '%a %b %d %H:%M:%S %Y')
time.strftime('%Y-%m-%d', newDate)
'2007-07-03'

import os, time, stat
file = os.stat('www.wav')
s = file.st_ctime
print time.localtime(s)