ASP + SQL Server + Time object problem
Alex Martelli
aleaxit at yahoo.com
Sat Jan 13 04:42:21 EST 2001
"Tim Hammerquist" <tim at degree.ath.cx> wrote in message
news:slrn95vghv.aqj.tim at degree.ath.cx...
[snip]
> Anyone in the newsgroup familiar with the object model of a "time
> object"?
Hammond's docs included with win32all document it this way:
PyTime Object
A Python object, representing an instant in time.
Comments
A PyTime object is used primarily when exchanging date/time information with
other COM objects.
Using int(timeObject) will return an integer compatible with the time
module.
Example
To return a simple string
time.ctime(int(timeObject))
To return a string formatted as the long date in control panel
time.strftime("%#c", time.localtime(int(timeObject)))
See Also
pywintypes::Time
Methods
Format
Formats the time value
__int__
Used when an integer representation of the time object is required.
__float__
Used when a floating point representation of the time object is required.
__print__
Used when the time object is printed. tp_print
__cmp__
Used when time objects are compared. tp_compare
__hash__
Used when the hash value of an time object is required tp_hash
Seems pretty good to me -- what's missing?
Alex
More information about the Python-list
mailing list