Re: convertir un datetime en milisegundos

Renato Covarrubias Romero <[email protected]>
Newsgroups gmane.comp.python.general.castellano
Message-ID <[email protected]>
El 03/09/09 16:18, Otto Machado escribió:
> 
> hola amigos
> 
> necesito convertir un obj datetime en milisegundos, hay una funcion que cuando le pasas
> los milisegundos te devuelve un datetime pero yo necesito alguna que sea al reves,por
> favor contestarme lo antes posible

Si en la variable a está el datetime

import time
time.mktime(a.timetuple())*1000+(a.microsecond/1000)

Será eso?

-- 
Renato Covarrubias Romero                   counter.li.org  #399677
rnt [at] rnt.cl                             http://rnt.cl

_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.