mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 13:30:08 +01:00
13 lines
376 B
Python
13 lines
376 B
Python
|
|
dt = wx.DateTime() # Uninitialized datetime
|
|
bDate = "25/12/2012"
|
|
|
|
if dt.ParseFormat(bDate, "%d-%m-%Y") == -1:
|
|
# This datetime format is wrong on purpose
|
|
print "Wrong format"
|
|
|
|
elif dt.ParseFormat(bDate, "%d/%m/%Y") >= 0:
|
|
# This is correct
|
|
print "Format OK!", dt
|
|
|