MS Access Forum / Forms / March 2007
Date changing 2028....2029......1930???????
|
|
Thread rating:  |
evilcowstare - 19 Mar 2007 18:51 GMT Hello!
I have a slight problem, in my form i have a date section which is automated as 00/00/00. I use these for part of a report as a from this date to this date, if you put 010125 it will automatically change it to 01/01/2025. The thing I have found is that it is fine until you get to 010130 and then it saves it as 01/01/1930 :-/ any ideas?
Thank You Jay
Douglas J. Steele - 19 Mar 2007 18:58 GMT Assuming you're using XP, go to Regional Settings in the Control Panel, and click on the Customize button. Look on the date tab, and you'll see what Windows is using as its instructions for interpretting 2 digit years. (It's there for other versions of Windows as well, but I can't guarantee that the instructions for finding it are identical)
 Signature Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
> Hello! > [quoted text clipped - 7 lines] > Thank You > Jay David W. Fenton - 19 Mar 2007 22:41 GMT > Assuming you're using XP, go to Regional Settings in the Control > Panel, and click on the Customize button. Look on the date tab, > and you'll see what Windows is using as its instructions for > interpretting 2 digit years. (It's there for other versions of > Windows as well, but I can't guarantee that the instructions for > finding it are identical) You can't really give instructions for WinXP any more for using Control Panel, because they introduced the ridiculously useless category view.
In Win2K, you just open the Regional Settings tool and go to the Date tab. That's much simpler than your instructions. What, exactly, did MS think they were improving by making it more complicated in WinXP?
(this is exactly why I've always rejected WinXP -- it adds complexity where none is needed, and tries to bleed it away (e.g., security) where it is essential)
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Rick Brandt - 19 Mar 2007 22:53 GMT >> Assuming you're using XP, go to Regional Settings in the Control >> Panel, and click on the Customize button. Look on the date tab, [quoted text clipped - 15 lines] > complexity where none is needed, and tries to bleed it away (e.g., > security) where it is essential) First thing I do on every XP box is switch Control Panel to "Classic View". Or are you referring to something else?
 Signature Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
David W. Fenton - 20 Mar 2007 15:46 GMT >>> Assuming you're using XP, go to Regional Settings in the Control >>> Panel, and click on the Customize button. Look on the date tab, [quoted text clipped - 18 lines] > First thing I do on every XP box is switch Control Panel to > "Classic View". Or are you referring to something else? Well, sure. I also switch the interface to Classic. And I turn on display of extensions and hidden files. And I turn off Simple Networking. And a whole host of other things that have the wrong settings in the default installation.
But if you're giving instructions for how to do something with Control Panel, you have to realize that not everybody has the same view -- they may be using the default Category View.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Douglas J. Steele - 20 Mar 2007 12:03 GMT >> Assuming you're using XP, go to Regional Settings in the Control >> Panel, and click on the Customize button. Look on the date tab, [quoted text clipped - 15 lines] > complexity where none is needed, and tries to bleed it away (e.g., > security) where it is essential) In the Category view, "Date, Time, Language and Regional Options" is one of the categories, and from there you can still choose the "Regional and Language Options" icon. (You're right, though, that I could have been more explicit, but like Rick I always switch to Classic View, so I sometimes forget about the "alternative" approach)
 Signature Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
David W. Fenton - 20 Mar 2007 15:47 GMT >>> Assuming you're using XP, go to Regional Settings in the Control >>> Panel, and click on the Customize button. Look on the date tab, [quoted text clipped - 22 lines] > Classic View, so I sometimes forget about the "alternative" > approach) I suspect that most of us who are answering questions here do the same thing.
But we have to make our answers usable for the people who *don't* know the things we do!
And that's extremely hard to remember how to dom in many cases.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
Rick Brandt - 20 Mar 2007 15:52 GMT > I suspect that most of us who are answering questions here do the > same thing. [quoted text clipped - 3 lines] > > And that's extremely hard to remember how to dom in many cases. I generally focus on the answer to the question asked.
"Change the setting in Windows Control Panel"
If the poster doesn't know how to do that then that is a separate question.
 Signature Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
Rick Brandt - 19 Mar 2007 18:59 GMT > Hello! > [quoted text clipped - 7 lines] > Thank You > Jay That is the curse of using two digit years (remember Y2K?). In your Windows Control Panel Regional settings there is a setting that determines what 2 digit value represents the cross-over value for assuming "19" as the first two digits versus "20". You can teak that if your app will never be used on any other PC. Otherwise the *correct* thing to do is to use a four digit year.
 Signature Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
Ofer Cohen - 19 Mar 2007 19:01 GMT Change the Input mask of the date field, so the user will have to input 4 digits in the date field, that will solve you the problem
 Signature Good Luck BS"D
> Hello! > [quoted text clipped - 6 lines] > Thank You > Jay evilcowstare - 19 Mar 2007 19:16 GMT Thanks everyone, guess i should make them 4 digit then lol.
Oh well, stupid pcs lol
Thanks Again to you all Jay
>Change the Input mask of the date field, so the user will have to input 4 >digits in the date field, that will solve you the problem [quoted text clipped - 4 lines] >> Thank You >> Jay John W. Vinson - 19 Mar 2007 20:57 GMT >Thanks everyone, guess i should make them 4 digit then lol. > >Oh well, stupid pcs lol ummm...
Don't blame the PC.
My late friend Anita was born in '97. So was one of her great-granddaughters.
What century is 8/1/28 in? That depends on the context; if it's somebody's birthdate then presumably it's the 20th century; if it's the maturity date of a thirty-year bond it's probably in the 21st. But without knowing what the user intends it is ambiguous. The "stupid" PC must make some sort of reasonable guess, or should simply disallow the two-digit shortcut.
John W. Vinson [MVP]
evilcowstare - 19 Mar 2007 21:17 GMT Then you would have thought it would just stick to one and not change after 29 yrs I still think it is stupid :-) lol
>>Thanks everyone, guess i should make them 4 digit then lol. >> [quoted text clipped - 13 lines] > > John W. Vinson [MVP] John W. Vinson - 20 Mar 2007 01:35 GMT >Then you would have thought it would just stick to one and not change after >29 yrs >I still think it is stupid :-) lol Think about it.
Do you want 06 to refer to 2006? Sure. That's last year.
Is it ok, then, to have 99 refer to 2099? Probably not; 1999 was only eight years ago.
If you DO want all two-digit years to refer to 21st century dates, go for it: follow the instructions elsewhere in the thread.
John W. Vinson [MVP]
evilcowstare - 20 Mar 2007 01:44 GMT I know exactly what your talking about, same as what other people said, I just found it strange how there is a cut off at 2029 thats all. Thanks for the help you did give
>>Then you would have thought it would just stick to one and not change after >>29 yrs [quoted text clipped - 11 lines] > > John W. Vinson [MVP] David W. Fenton - 20 Mar 2007 15:48 GMT > I > just found it strange how there is a cut off at 2029 thats all. Where would you want the cutoff to be?
That is, how would you want your computer to guess what you mean?
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
evilcowstare - 20 Mar 2007 15:53 GMT Well you would have thought that the people that designed access would have put it in as an option, so you can decide where the years should start from yourself. So for example if you put 2001 then it would automatically change any date from that so if you put 30 it would know it would be 2030 not 1930. There seems to be lots of things access could have done to make life a lot easier. Oh well
>> I >> just found it strange how there is a cut off at 2029 thats all. > >Where would you want the cutoff to be? > >That is, how would you want your computer to guess what you mean? Douglas J. Steele - 20 Mar 2007 16:24 GMT It IS an option, not in Access itself, but in Windows.
As I've already said, you need to look at Regional Settings to change it.
 Signature Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!)
> Well you would have thought that the people that designed access would > have [quoted text clipped - 14 lines] >> >>That is, how would you want your computer to guess what you mean? evilcowstare - 20 Mar 2007 16:29 GMT yeah i know its an option in windows but thats only good if its going to be on just one pc, if it moves about then it would have been good to have something in access that you can set so that the db picks up on the settings you have chosen automatically
>It IS an option, not in Access itself, but in Windows. > [quoted text clipped - 5 lines] >>> >>>That is, how would you want your computer to guess what you mean? David W. Fenton - 20 Mar 2007 21:26 GMT > yeah i know its an option in windows but thats only good if its > going to be on just one pc, if it moves about then it would have > been good to have something in access that you can set so that the > db picks up on the settings you have chosen automatically But that's the whole point why you need to eliminate the problem by requiring 4-digit entry of years. You're quite right that you don't want the behavior of your application to change just because it's on a different PC, and when Y2K happened, I was among those who wished that there was a setting internal to Access for this.
But MS is often not very smart about things they put in Access. For instance, Autocorrect (not Name Autocorrect, which is an abomination of another type) is a component shared between all the Office programs, and it's based on user-entered data. But Access defaults to Autocorrect being ON in all textboxes and combo boxes. It's not such a tragedy for textboxes, but it's the stupidest thing on the planet for combo boxes. I first encountered this in an app where a user was trying to choose an item from a dropdown list and when they chose it, the Access said "not a valid item from the list." Why? It was changing "cafe" as it was spelled in the dropdown text to "café" because that was an Autocorrect entry, and "café" wasn't one of the choices!
So, sometimes MS's efforts towards "ease of use" conflict with the goals of a database program, where you want to insure the validity and accuracy of data. Because of that, you as a developer have to take responsibility for overriding these default MS configurations, which means you have to force 4-digit entry of years or write your own validation code, and you have to make sure you go through and turn off Autocorrect on all your dropdown lists.
 Signature David W. Fenton http://www.dfenton.com/ usenet at dfenton dot com http://www.dfenton.com/DFA/
|
|
|