Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图将日期时间字符串转换为 SArray 的日期时间(使用 C++ 助推器库),但它似乎不理解%p格式说明符。http://www.boost.org/doc/libs/1_43_0/doc/html/date_time/date_time_io.html 该文档说用! do not currently work for input. 这是否意味着您无法使用pmor解析任何内容PM?
%p
!
do not currently work for input
pm
PM
通过进行两个小的更改,我能够使字符串到日期时间的转换正常工作:
这对我有用:
sf = gl.SFrame({'date': ['2015-11-06 02:12:42 pm', '2015-11-05 03:43:11 pm']}) sf['date2'] = sf['date'].str_to_datetime('%Y-%m-%d %I:%M:%S %p')