Re: [datetime] wx, python, sqlalchemy
Robin Dunn <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > I need to get a Date from a wx.DatePickerCtrl and store it as > sqlalchemy.Date. > > How can I do this without tricks? Aren't there converting methods > inbuild. I wonder that this doesn't work > > wxdate = wx.DateTime() > pdate = datetime(wxdate) > sqldate = sqlalchemy.Date(wxdate) > > I have found this post about it that Robin planed to > change something about it. > <http://wxpython-users.1045709.n5.nabble.com/wx-DateTime-python-datetime-tp2357748p2357749.html> > In Phoenix there is a typemap for the wxDateTime wrapper that will automatically convert from a Python date or datetime anywhere that a wxDateTime is needed. There are also wx.pydate2wxdate and wx.wxdate2pydate functions available for explicit conversions. I thought that functions like those had been moved into the core namespace on Classic too, but it looks like they are still stuck in the wx.calendar module. -- Robin Dunn Software Craftsman http://wxPython.org -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.