Re: Date Format Problem - mm.yy

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Gina wrote:
>I am storing MOT as a date field in a table. .... unfortunately when user
>types 04.05 ( meaning april 2005 - in Germany ) access creates stuff like
>04.05.2005 .....- 4th of may :(
>
>I am struggeling around on this date stuff already the whole morning ....
>and I can't see any land on this ...
>
>I changed the format of the field in the table to be mm.yy - without an
>input mask .....
>same in the form field ....
>
>when I click on the form field it shows the full date .... 04.05.2005 ...
>
>how can I avoid all this .... what I want is the user to be able to just
>type in month.year ... access to make the year out of the last 2 digits,
>store it exactly like this in the table, and the form should show it in the
>same format even I click on it!!


I'm with Brenden on how to avoid this issue, but it might
help if you understood how Access converts what you type to
a date value. It is pretty confusing because Access tries
too hard to make sense of a bunch of characters.

If the two values can be interpreted as a month and day
(e.g. 4-9), then Access will automatically supply the
current year (9 April 2005). If the month or day won't work
(e.g. 4-99), then Access uses the too large number as the
year and automatically supplies the first day of the month
(1 April 1999).

There are a bunch of other issues involving the delimiter
character, especially with different regional settings in
Windows.

Bottom line is use two text boxes or teach your users to
enter a four digit year.

--
Marsh
MVP [MS Access]
.



Relevant Pages

  • Re: Number to vectors
    ... But I still got the problem because my number has got a lot of digits. ... The above will need several details including the last partial buffer assuming not multiple of the 1024 and preallocating v to avoid the runtime overhead therein. ... But, the idea is to slurp up a piece of the file at a time as characters, and convert to double a character at a time. ...
    (comp.soft-sys.matlab)
  • Re: Paper & pencil password algorithm
    ... currently I am using a 10x10 Polybius square. ... How would you convert base 11 digits to base 10 digits with uniform ... characters to find on the keyboard. ... I'm undecided on whether it should be 2 or 3 foldsums. ...
    (sci.crypt)
  • Re: Question for the math wizards...
    ... string of characters that isn't too long, ... bits per character with base-32 encoding, then we are limited to shipping ... to know if it was possible given m to map m via a function Fto an m' ... In real world terms, say n is 100 digits, m is 50 digits, and I want to ...
    (sci.crypt)
  • Re: Invariant with DIGIT-CHAR-P and the reader.
    ... should appear to the Lisp reader as a number. ... >> reading of the standard makes me believe the Lisp reader should ... > Why a new CL could not accept more forms for unicode digits? ... a..z, characters chosen by the implementation, and not from some higher ...
    (comp.lang.lisp)
  • Re: Is 52 any good?
    ... seriously he's gotta stop the whole endorsement, ... have to buy a bunch of other books of verying quality and importance. ... all these characters in snippets without having to read an entire 30 ...
    (rec.arts.comics.dc.universe)