converting a string data to a float value for access database

T

tedpottel

Hi,

I am trying to copy a sql database to a access database using python.
I can copy all the fields, but the date. I can store a float value in
access data object, ie http://en.wikibooks.org/wiki/JET_Database/Data_types#Dates_and_times

So access uses a float for a date, and mysql databse uses text, I got
the following as the output 2008-11-25 09:59:39.
How can I convert the string 2008-11-25 09:59:39 from mysql to a float
for access??????


-Ted
 
M

M.-A. Lemburg

Hi,

I am trying to copy a sql database to a access database using python.
I can copy all the fields, but the date. I can store a float value in
access data object, ie http://en.wikibooks.org/wiki/JET_Database/Data_types#Dates_and_times

So access uses a float for a date, and mysql databse uses text, I got
the following as the output 2008-11-25 09:59:39.
How can I convert the string 2008-11-25 09:59:39 from mysql to a float
for access??????

Use mxDateTime:
39777.41642361111

See http://www.egenix.com/products/python/mxBase/mxDateTime/

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Nov 25 2008)________________________________________________________________________
2008-11-12: Released mxODBC.Connect 0.9.3 http://python.egenix.com/

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top