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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SET CENTURY Weirdness 1

Status
Not open for further replies.

xBaseDude

MIS
Jan 31, 2002
357
US
Gentlemen;

So I have a DATE field in my table. I am unaware of what the status of SET CENT on when I created the table.

The defa appearance of the date field shows a 2 digit century.

SET CENT ON

Seems to have no effect on the date column. But if I scroll down the date column field, the active "cell" shows the date in the correct 4 digit format...iow 2003, but reverts back to 2 digit display when the field loses focus...iow..03

Also a textbox (built by the builder) also seems to be ignoring the SET CENT command.

Any idea what up?

TIA - Wayne
sig_jugler.gif
...all this and tap dancing too!
 
Wayne,
First a TextBox will display a date based on the current DateFormat property setting. Also the SET DATE is one of the many settings that gets reset in a Private Datasession. You may also have to set the Grid's column SPARSE setting to .F. to see the non-default format all the time. Isn't VFP fun? - so many places to change the "normal" settings!

Rick
 
Wayne:

1. Is your DATE contained in a field with a data type of D (and not C)? If so, it doesn't make any difference "what the status of SET CENT on when I created the table". Try changing the SET CENT status and browse.

2. I believe displaying the century in an active cell is an inherent VFP feature.

3. Is there any code in the form that would be setting century to OFF. In the value property of the text box, enter {} (double braces).

If you haven't already, issue a SET CENT ON in your Main program or INIT event of your form.

Al
 
Rick;

First a TextBox will display a date based on the current DateFormat property setting.

Eureka moment baby!

Changing this setting from 0=default to 1=american worked for me, and made SET CENT work as to how I am accustomed.

Next thing I need to learn about is about "Private Data Sessions". But till next thread...

Alan;

1. Is your DATE contained in a field with a data type of D (and not C)?

Good point, but not the issue here. The field is a guaranteed date type and not a character type. Since setting a textbox value has snagged me before I am currently using the builder to id textbox data types.

The value of the property for the textbox is {}
(as must have been done by the builder as I wouldn't have known that, but yes it was set to that value.)

issue a SET CENT ON in your Main program

...must had about a 100 of them all to no avail.

Again gentlemen - Thank You for takin' the time to share your knowledge with me.

Regards - Wayne


sig_jugler.gif
...all this and tap dancing too!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top