将日期时间(7/19/2017 0:00)转换为YYYY-MM-DDTHH:mm:ss.000Z在Python中

时间:2017-10-25 16:51:38

标签: datetime

我正在尝试将类似7/19/2017 0:00的内容转换为YYYY-MM-DDTHH:mm:ss.000Z。有谁知道如何在Python中做点什么?

我试过这样做:

template<typename data_type>
template <typename ... Ts>   
constexpr Matrix<data_type>::Matrix(std::size_t row , 
                                    std::size_t col ,
                                    Ts&&... args     ) noexcept : row{row}, columns{col},
                                                                   data{ new data_type[row*col] },

{
        std::size_t i =0;    
        assert(sizeof...(args) == row*columns );    
        data[i++] = (std::forward<Ts>(args)...);          
}

阿德里安

1 个答案:

答案 0 :(得分:1)

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<div class="form-group has-feedback"><input type="search" class="form-control"/><span class="glyphicon glyphicon-search form-control-feedback glyphicon-custom"></span></div>

您可以使用此处提供的documentation来格式化所需格式的日期。