dongxin1999 2013-02-24 21:44
浏览 51

字符串到时间戳

I have this date time stuff, that needs to be converted to timestamp. I am looking for conversions in 3 states, with Javascript, Python and PHP. My main problem is that I am not able to catch what format this string is in: 2013-07-29T18:54:09.743390-08:00 Also, can anybody please share what format this is?

  • 写回答

3条回答 默认 最新

  • dsf4s5787 2013-02-24 21:50
    关注

    A generic way to do this with PHP is strtotime()
    In Javascript, you can try to

    var d=new Date("your datetime here");
    

    Although, I am not 100% sure of the result you will get with the format you have. Maybe someone else can help out about that.
    As for Python, someone else should probably help you, as I am not familiar. Or you could google "python equivalent to php strtotime", or similar.

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测