Date

The code below was cut/paste from pyshell after monkeying with wxDateTime
stuff.. I hope it still works, if not you should get the idea...

# Import the date / time objects
from wxPython.wx import wxDateTimeFromDMY, wxTimeSpan

# Now create the "starting" date.. This is the date you will add / subtract
to/from
# Arguments are Day, Month, Year - Jan 01, 2003
# NOTE - months start at 0. 0 is January

···

#
dt = wxDateTimeFromDMY( 01, 00, 03 )
dt.Format()
## returns -->'01/01/03 00:00:00'

# Now create a wxTimeSpan. Timespans are a measure of time in hours, min,
secs, msecs
# The timespan below is 24 hours, 0 min, 0 secs, 0 msecs
ts = wxTimeSpan( 24, 0, 0, 0 )
ts.Format( "%H:%M:%S" )
## returns -->'24:00:00'

# Now add / subtract the timespan..
dt.AddTS( ts )
## returns -> <wxDateTime: "01/02/03 00:00:00" at _186cb80_wxDateTime_p>

HTH,
jaime

-----Original Message-----
From: Greg Binns [mailto:gregbin@bigpond.net.au]
Sent: Wednesday, September 24, 2003 6:48 AM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Date

Hi
My questions may be dumb but the answers are not.
I guess this is simple but the docs are somewhat arcane, to me anyway.
How do I add one day to a date in format YYYY-MM-DD.
Thanks in advance

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org