wxPython date

J

Jason

How do I form a new wxPython date using day, month and year?

I've tried the wx.DateTimeFromDMY but it crashes in Pythonwin when I
test it out and I get all manner of complaints when I try it from the
command line.

Surely there's an equivalent to the python datetime.date(2005,07,18)

thanks,

jason
 
P

Peter Decker

How do I form a new wxPython date using day, month and year?

I've tried the wx.DateTimeFromDMY but it crashes in Pythonwin when I
test it out and I get all manner of complaints when I try it from the
command line.

Surely there's an equivalent to the python datetime.date(2005,07,18)

Are you specifying the date in DMY format? Also, remember that the
months are zero based. This works fine on my systems (both OS X and
Linux):

import wx
dt = wx.DateTimeFromDMY(18, 6, 2005)
print dt
-> Mon Jul 18 00:00:00 2005
 
J

Jason

Thanks, Peter.

I must have been having a bit of the stupids, your example worked fine
for me too.

Back to the salt mines!
 

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
474,261
Messages
2,571,308
Members
47,976
Latest member
AlanaKeech

Latest Threads

Top