On Mon, 4 Dec 2006 01:11:30 +0530, "krishnakant Mane"
<> declaimed the following in comp.lang.python:
> I am tired searching for some good tutorial that can explain the basic
> functionality of wx.datetime class and the datetime picker.
> I want to display the date in dd/mm/yyyy format and allow the user to
> change the dates.
Simplest is probably to do what many web-sites use for credit card
expiration dates... Ignore any pre-built date-time modules...
Create three integer fields, make the first two drop-down lists
pre-populated with days and months. And validate the results later (just
to cover someone putting in 31 02 xxxx).
> I then will like to take the value (the entire date) and put into a database.
> now this is my first question.
Uhm... WHAT is your first question? There is only one question in
this entire post, and it is near the bottom -- the simple "how can I
achieve this?" (Which, in a way, is as open-ended as stating: "I have
$10, I want to turn it into $1000000 without leaving my bed. How can I
achieve this?")
> the other problem is even more tough to solve with my given knowledge
> of wx.datetime and related classes.
> unfortunately the database given to me has a text field for date and
> the data is neetly entered.
> but when I get the data back from that text field I some how want to
> convert it back to actual date in the same dd/mm/yyyy format and send
You don't show us what format is used in the database, so there is
nothing to base a conversion on. Is it year/month/day, month/day/year;
months numeric or alpha (abbreviated or spelled out). Fields separated
by space, comma, -, :, or /
> this as a value to my date time picker.
Note that, based upon the documentation, wxDatePickerCtrl works
internally in wxDateTime -- which is a 64bit integer in milliseconds
(and is NOT compatible with common c/unix time stamps). Any human
readable date time is a formatting operation.
Of course, if you follow my suggestion of simply using three input
fields, the internal format could be anything you need.
--
Wulfraed Dennis Lee Bieber KD6MOG
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff:
web-)
HTTP://www.bestiaria.com/