ArcMap中毫秒转换为日期格式
2016-09-29 09:27
513 查看
参考http://blog.csdn.net/muzilanlan/article/details/45647883
最近遇到一个问题,需要将shp图层中的毫秒值转换日期格式,参考上面的文章,自己进行了如下修改:
最近遇到一个问题,需要将shp图层中的毫秒值转换日期格式,参考上面的文章,自己进行了如下修改:
import time #秒转换为日期 def Time2ISOString(s): if (s.strip() and not s.__contains__("-")): return time.strftime("%Y-%m-%d", time.localtime(float(s) / 1000)) else: return s print Time2ISOString("1456531200000");
在ArcMap中调用
即可得到结果
相关文章推荐
- java中日期时间格式与毫秒数的转换如何将指定时间转换为Date类型
- JS中将毫秒转换成任意日期格式
- 用js将从后台得到的时间戳(毫秒数)转换为想要的日期格式
- 用js将从后台得到的时间戳(毫秒数)转换为想要的日期格式
- iphone开发毫秒数转换成日期格式
- java中日期格式之间的转换yyyy-MM-dd HH:mm:ss和毫秒数之间
- 用js将从后台得到的时间戳(毫秒数)转换为想要的日期格式
- 由毫秒(ms)转换为日期和时间的格式(简单易用)
- 把格式日期转换成毫秒
- js将毫秒转换成指定格式的日期时间
- java中日期时间格式与毫秒数的转换
- 由毫秒(ms)转换为日期和时间的格式(简单易用)
- JS、Jquery实现---把后台传过来的时间毫秒数转换成想要的日期格式
- 用js将从后台得到的时间戳(毫秒数)转换为想要的日期格式
- Java中日期时间格式与毫秒数的相互转换
- jsp页面-把毫秒数转换成日期格式
- js中Date日期格式转换以及时间和毫秒之间的转换
- Java毫秒转换成日期格式
- 时间格式的转换日期转换毫秒
- 在JS中如何把毫秒转换成规定的日期时间格式实例