ODBC / DBI help (via Win32 Extensions)

Benjamin Schollnick junkster at nospam.rochester.rr.com
Sat Apr 29 21:05:19 CEST 2000


On Sun, 29 Apr 3900 11:46:01, "Andy Smith" <andy at ictibroker.com> 
wrote:

> Calling the str method on a dbiDate will return a human-readable date.
> Also, calling int(myDbiDate) will return a 'seconds since the epoch'
> integer, which you can then easily work with using the functions in the
> 'time' module. I confess there may be methods of a dbiDate that can achieve
> the same, but I'm happy enough to just convert them to integers ;)
> 
> Here's an operation on dbiDates that should help you get an access-friendly
> format - (but remember to wrap in #'s cos that's crucial too!)
> 
> def dbToReuters(x):
>     a = time.localtime(int(x))
>     return time.strftime("%m/%d/%Y", time.localtime(int(x)))

Thanks, I'll try this on monday, and see what happens.... 

All of the development gets done at work, Thank God, or my
Girlfriend/Financee would kill me >g<  or worse (!!) pull the power
on the computers.... >g<

		- Benjamin



More information about the Python-list mailing list