Problem assigning timevalue to Excel - COM

Robin Becker robin at jessikat.demon.co.uk
Wed Jun 14 10:10:08 EDT 2000


In article <8i7pp7$1vl$1 at newstoo.ericsson.se>, Bror Johansson
<bror.johansson at esavionics.se> writes
>I haven't found out what type and/or format to use when assigning a value to
>a cell in MS Excel having a predefined time format like this:
>1997-04-03  12:15:00
>
>When reading - via COM - from a cell with a manually entered content, I get
>a 'time object' back.
>This 'time object' is recognized as being of 'TimeType' and can be converted
>to an int.
>
>How can I convert an int into something that can be assigned to the Value
>property of the desired cell and be accepted according to the format as of
>above?
>
>TIA /BrorJ
>
>
the time values used by excel are double floats. The integer part
represents days, the mantissa the day fraction. There are two systems
based on
1==1/jan/1900 or 1==1/jan/1904; this because M$ morons didn't know that
1900 wasn't a leap year.
-- 
Robin Becker



More information about the Python-list mailing list