473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problem formatting dates from text fields.

hello all.
thanks for the help and for pointing me to the proper url for wxpython
related issues.
I am so happy that I now have a very easy gui library that can do
practically every thing with such ease (no flames intended but I was
never at so much ease with java swing ).
I however have a problem with dates.
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.
I then will like to take the value (the entire date) and put into a database.
now this is my first question.
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
this as a value to my date time picker.
how can I achieve this?
thanking all.
Krishnakant.
Dec 3 '06 #1
5 1469

Dennis Lee Bieber wrote:
On Mon, 4 Dec 2006 01:11:30 +0530, "krishnakant Mane"
<re**********@gmail.comdeclaimed 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).
My 2 cents worth:

(1) this annoys the bejaysus out of data inputters who can type
"31\t12" a lot faster than they can pick it out of two drop-down lists.

(2) this would annoy the bejaysus out of data users if they were aware
of the extent of off-by-one errors caused by using drop-down lists.

Cheers,
John

Dec 3 '06 #2
On 04/12/06, Dennis Lee Bieber <wl*****@ix.netcom.comwrote:
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 /
the format in the text field is dd/mm/yyyy which is perfect for what I need.
but the problem as I said is to get this text into a value that can
fit into a date time picker.
can this be done?
Krishnakant.
Dec 4 '06 #3
is there a soft copy of wxpython in action available for free download?
I saw the book on my book store but since I am totally blind, I have
to depend on soft copies.
Krishnakant.
Dec 4 '06 #4
krishnakant Mane wrote:
is there a soft copy of wxpython in action available for free download?
I saw the book on my book store but since I am totally blind, I have
to depend on soft copies.
It is not available for free, no. However, it is available in PDF form from
Manning's website:

http://www.manning.com/rappin/

If their Yahoo store is not accessible via your web reader (I have no
experience, so I won't depend on it), you can email the publisher's customer
service at su*****@manning.com and I'm sure they will get the book to you in a
form you can read.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Dec 4 '06 #5
"John Machin" <sj******@lexicon.netwrote:
Dennis Lee Bieber wrote:
8<--------------------------------------------------
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).

My 2 cents worth:

(1) this annoys the bejaysus out of data inputters who can type
"31\t12" a lot faster than they can pick it out of two drop-down lists.

(2) this would annoy the bejaysus out of data users if they were aware
of the extent of off-by-one errors caused by using drop-down lists.

Cheers,
John
This annoyance can be maximised if, after the selection, a pop up dialog window
is displayed showing what was chosen, along with the following text:

"This is what you have chosen - Please indicate whether or not you wish to re
try"

- with the focus on the "yes" button.
and then, when "yes" is chosen, to start again without any attempt to remember
the previously entered values

- Hendrik
Dec 4 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process...
2
by: Ange T | last post by:
Hi there, I've read stacks of articles on this subject in this newsgroup, so forgive me that this is just another one. I've tried almost all the suggestions offered, and am still having no luck....
2
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold...
3
by: Andy_Khosravi | last post by:
I have been trying to build a user friendly search engine for a small database I have created. I'm having some particular problems with one of my date fields. Here's the setup: I'm using...
4
by: Jeff Goodman | last post by:
If there is a better newsgroup to post this in, please let me know. I am a relatively new VB.NET/SQL 2000 programmer. I am working with data imported into SQL2K from Access. Many of the dates...
5
by: Dave | last post by:
Hello, I have a possible problem exporting a text field that happens to contain dates (but is not a date field) when using TransferText in MS Access 2000. I am exporting a query to a text...
3
by: myemail.an | last post by:
If I need to format how the content of a field is displayed, I can click ALT + ENTER from design view, and specify the format, for example, the number of decimal digits and so on. Is there a way...
7
by: creative1 | last post by:
Hello everyone. I am experiencing a strange problem that I can't fix on my own. I think I need expert's suggestions for this. The problem is: I want to print account statement (or any other...
2
by: Ceebaby via AccessMonster.com | last post by:
Hi Folks I wondered if someone could point me in the right direction before I completely tear my hair out. I have a user selection form where options can be selected for a report. Users now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.