Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date mask and edit box

Status
Not open for further replies.

bbegley

Programmer
Apr 29, 2002
228
US
We have dbedit boxes for date fields with this mask on the field: !99/99/9999;1;_

We have never had problems with this mask before (nor am I certain it's a mask problem now).

We use the settext event on the table component to verify that the date entered is valid. After that there are a number of business logic verifications that we push the date through. For some reason, the edit.text for dates that include leading zeroes are coming up wrong. If we enter 11/17/2002 there is no problem, but if we enter 01/01/2003 then the edit.text reads as ' /1///203'. On the screen, it displays the correct looking value, but when we enter the edit box it shows '_1/_1/2003'.

Anyone seen anything like this before? We recently switched to WinXP, and haven't worked on that project much since we switched to delphi 6. Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole
 
We found this. We had changed the fields from Date to DateTime for MS Access compatibility, and had not reentered the "DisplayFormat" property of the fields after adding them back to the datamodule. We also had a custom component that cleaned up the leading underscore characters that addressed only Date fields.
Thanks to anyone who tried to figure this out for us. Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top