ODBC and Access Short time format

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.terra.es

    ODBC and Access Short time format

    Hi all,

    I cannot manage an Access short time date format from python ODBC.
    How could I do?

    Here it is an example of what I do.
    [color=blue][color=green][color=darkred]
    >>> import odbc
    >>> cnn = odbc.odbc("DATE TEST")
    >>> cur = cnn.cursor()
    >>> cur.execute('se lect * from fechas')[/color][/color][/color]
    0[color=blue][color=green][color=darkred]
    >>> print cur.description[/color][/color][/color]
    [('fLongDate', 'DATE', 19, 19, 0, 0, 1), ('fShortTime', 'DATE', 19, 19, 0,
    0, 1)]
    [color=blue][color=green][color=darkred]
    >>> print time.strftime(" %d-%m-%Y %H:%M",time.loc altime(rec[0].value))[/color][/color][/color]
    31-12-2001 20:30
    [color=blue][color=green][color=darkred]
    >>> print time.strftime(" %H:%M",time.loc altime(rec[1].value))[/color][/color][/color]
    Traceback (most recent call last):
    File "<interacti ve input>", line 1, in ?
    IOError: [Errno 22] Invalid argument

    Regards


  • Wilk

    #2
    Re: ODBC and Access Short time format

    "news.terra .es" <alvmart@terra. es> writes:
    [color=blue]
    > Hi all,
    >
    > I cannot manage an Access short time date format from python ODBC.
    > How could I do?[/color]

    maybe you could try http://adodbapi.sf.net ?

    --
    Wilk - http://flibuste.net

    Comment

    Working...