2006年01月06日 星期五 23:33
我现在想把"2006-1-6"的日期转换成"060102"的形式,请问PYTHON有没有比较便捷的办法? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060106/1933f302/attachment.html
2006年01月07日 星期六 08:33
VB中可以使用Format函数来改,例如 Print Format ("2006-1-6", "yyyymmdd") 嘿嘿,Python我也是初学,不会 在06-1-6,shi jizhi <shijizhi at gmail.com> 写道: > > 我现在想把"2006-1-6"的日期转换成"060102"的形式,请问PYTHON有没有比较便捷的办法? > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -- 没事喜欢和大家随便聊聊! ------------------------------------------- My Blog: http://spaces.msn.com/members/walkline My MSN: walkline_wang81 at hotmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060107/c4dfb2ba/attachment-0001.html
2006年01月07日 星期六 10:54
试一下这个 from time import strptime, strftime t = strptime('2006-1-6', '%Y-%M-%d') print strftime("%y%m%d", t) .... Devin 在06-1-7,王鑫 <walkline at gmail.com> 写道: > > VB中可以使用Format函数来改,例如 Print Format ("2006-1-6", "yyyymmdd") > 嘿嘿,Python我也是初学,不会 > > 在06-1-6,shi jizhi <shijizhi at gmail.com> 写道: > > > > 我现在想把"2006-1-6"的日期转换成"060102"的形式,请问PYTHON有没有比较便捷的办法? > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > -- > 没事喜欢和大家随便聊聊! > ------------------------------------------- > > My Blog: http://spaces.msn.com/members/walkline > My MSN: walkline_wang81 at hotmail.com > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060107/1dbab29d/attachment.html
2006年01月08日 星期日 08:59
好的,谢谢 在06-1-7,Devin Deng <deng.devin at gmail.com> 写道: > > 试一下这个 > from time import strptime, strftime > t = strptime('2006-1-6', '%Y-%M-%d') > print strftime("%y%m%d", t) > > .... > > Devin > > 在06-1-7, 王鑫 <walkline at gmail.com> 写道: > > > > VB中可以使用Format函数来改,例如 Print Format ("2006-1-6", "yyyymmdd") > > 嘿嘿,Python我也是初学,不会 > > > > 在06-1-6,shi jizhi <shijizhi at gmail.com> 写道: > > > > > > 我现在想把"2006-1-6"的日期转换成"060102"的形式,请问PYTHON有没有比较便捷的办法? > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese at lists.python.cn > > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > > > > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > -- > > 没事喜欢和大家随便聊聊! > > ------------------------------------------- > > > > My Blog: http://spaces.msn.com/members/walkline > > My MSN: walkline_wang81 at hotmail.com > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request at lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060108/f74da321/attachment.htm
Zeuux © 2025
京ICP备05028076号