def _elapsed_time ( begin_time , end_time ) : bt = _str2datetime ( begin_time ) et = _str2datetime ( end_time ) return float ( ( et - bt ) . seconds )
python get minutes elapsed two datetimes
Assuming format YYYY - MM - DD hh : mm : ss
def _elapsed_time(begin_time, end_time):
    """Assuming format YYYY-MM-DD hh:mm:ss

    Returns the elapsed time in seconds
    """

    bt = _str2datetime(begin_time)
    et = _str2datetime(end_time)

    return float((et - bt).seconds)