Hi, ALL,
Is there an easy way to do such a conversion?
Or I have to convert to python datetime object first?
Thank you.
Hi, ALL,
Is there an easy way to do such a conversion?
Or I have to convert to python datetime object first?
Thank you.
I think what you are searching for is:
wx.DateTime.Format()
wx.DateTime.FormatDate()
wx.DateTime.FormatTime()
Hi, Torsten,
I think what you are searching for is:
wx.DateTime.Format()
wx.DateTime.FormatDate()
wx.DateTime.FormatTime()
I tried to use following code:
date_from = self.date_from.GetValue()
date_to = self.date_to.GetValue()
good_message = "Modification Time between " + date_from.Format('%F',
wx.DateTime.UTC) + " and " + date_to.Format('%F', wx.DateTime.UTC)
But I got python to crash.
It is on Windows XP SP3 32-bit with python 2.7 and wxPython 2.9.4.0.
Any idea?
I'm in US and the self.date_from is the value from the
wx.DatePickerCtrl: 3/28/2014.
Thank you.
On Fri, Mar 28, 2014 at 7:24 AM, Torsten <topic2k@googlemail.com> wrote:
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ALL,
Hi, Torsten,
I think what you are searching for is:
wx.DateTime.Format()
wx.DateTime.FormatDate()
wx.DateTime.FormatTime()I tried to use following code:
date_from = self.date_from.GetValue()
date_to = self.date_to.GetValue()
good_message = "Modification Time between " + date_from.Format('%F',
wx.DateTime.UTC) + " and " + date_to.Format('%F', wx.DateTime.UTC)But I got python to crash.
It is on Windows XP SP3 32-bit with python 2.7 and wxPython 2.9.4.0.Any idea?
I'm in US and the self.date_from is the value from the
wx.DatePickerCtrl: 3/28/2014.
On the page: http://www.cplusplus.com/reference/ctime/strftime/ '%F'
is referenced as a valid
format specifier for the strftime() which means, according to wxPython
documentation
it should be possible to use on wx.DateTime Format() function.
Is this a bug in that function?
Or my version of wxPython is not supported this parameter? Because
python is just crashing
without throwing any exceptions.
Thank you.
On Fri, Mar 28, 2014 at 3:11 PM, Igor Korot <ikorot01@gmail.com> wrote:
On Fri, Mar 28, 2014 at 7:24 AM, Torsten <topic2k@googlemail.com> wrote:
Thank you.
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I tried it with %F and it crashes too. I’m on Win7 64Bit, Python 2.7.6 32Bit and wx 2.9.5.
%F is equivalent to %Y-%m-%d and that is working. Maybe there’s really a bug.
Torsten,
I tried it with %F and it crashes too. I'm on Win7 64Bit, Python 2.7.6 32Bit
and wx 2.9.5.%F is equivalent to %Y-%m-%d and that is working. Maybe there's really a
bug.
Thank you for confirming.
Hopefully Robin will be able to check whether it is really a bug or not.
Unfortunately I don't have wxWidgets compiled on this machine to
check. I installed wxPython from the binary package....
Thank you.
On Sat, Mar 29, 2014 at 12:32 AM, Torsten <topic2k@googlemail.com> wrote:
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Easy:
python -c"import wx;now=wx.DateTime.Now();s_now=str(now);print s_now;"
Sat Mar 29 08:10:23 2014
On 28/03/14 08:58, Igor Korot wrote:
Hi, ALL,
Is there an easy way to do such a conversion?
Or I have to convert to python datetime object first?Thank you.
Igor Korot wrote:
Torsten,
I tried it with %F and it crashes too. I'm on Win7 64Bit, Python 2.7.6 32Bit
and wx 2.9.5.%F is equivalent to %Y-%m-%d and that is working. Maybe there's really a
bug.Thank you for confirming.
Hopefully Robin will be able to check whether it is really a bug or not.
Yes it appears to be a bug with %F, and only on Windows. Please search for a Trac ticket about it and add one if you don't find one already there.
On Sat, Mar 29, 2014 at 12:32 AM, Torsten<topic2k@googlemail.com> wrote:
--
Robin Dunn
Software Craftsman