INPUT MASK OF FEBRUARY I GUESS IS BROKEN "29"/\2/0000;0; Date-Time (1 Viewer)

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Hi guys;
i went to a weird error saying i cannot enter a data(As a date) into a (date-short date field) even the input mask wizard run my own mask correctly, as u know the February day ending is 29 so i figure out in wizard : "29"/\2/0000;0; because i want user have some automation when typing (user must enter just a year of every February Month)
so anyone can help me out with this ty so much for ur feedback <3
 

Attachments

  • {24314C30-989E-4B99-9BC7-CC720E4BF1D0}.png.jpg
    {24314C30-989E-4B99-9BC7-CC720E4BF1D0}.png.jpg
    227.1 KB · Views: 127

Isaac

Lifelong Learner
Local time
Yesterday, 21:16
Joined
Mar 14, 2017
Messages
8,777
Which specific date were you trying to type?
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Which specific date were you trying to type?
Hey
i want to let user just type a year like 2019
and input mask already has day and month : 29/2/....
i got this problem only with February else works fine with some custom inputs
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:16
Joined
Oct 29, 2018
Messages
21,471
Hi MicroAbdel.

Welcome to AWF!

First, Input Masks are sometimes more of an inconvenience than they are helpful. However, the bigger concern would be your table structure. It looks like it's not properly normalized.
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Hi MicroAbdel.

Welcome to AWF!

First, Input Masks are sometimes more of an inconvenience than they are helpful. However, the bigger concern would be your table structure. It looks like it's not properly normalized.

Hii ty for welcoming
i guess is not about my table structure or Db structure cause i did a test of the same input mask in empty DB and error run out again!
 

Isaac

Lifelong Learner
Local time
Yesterday, 21:16
Joined
Mar 14, 2017
Messages
8,777
Hey
i want to let user just type a year like 2019
and input mask already has day and month : 29/2/....
i got this problem only with February else works fine with some custom inputs
Maybe that's the problem, then. Access won't let a user type in a year where the date 2/29 did not exist....like 2019.
Your input mask is attempting to allow something that doesn't work....the typing of 2/29 during years when that's not a valid date.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:16
Joined
Oct 29, 2018
Messages
21,471
Hii ty for welcoming
i guess is not about my table structure or Db structure cause i did a test of the same input mask in empty DB and error run out again!
Hi. I wasn't addressing your problem with the input mask when I mentioned about your table structure. Those two topics are not related. I just thought I would raise the concern for you regarding the potentially bad table structure.
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Maybe that's the problem, then. Access won't let a user type in a year where the date 2/29 did not exist....like 2019.
Your input mask is attempting to allow something that doesn't work....the typing of 2/29 during years when that's not a valid date.
The problem with MS access cause i did the same type of input masks with other months and works fine but February programming code has some issue from Microsoft
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Hi. I wasn't addressing your problem with the input mask when I mentioned about your table structure. Those two topics are not related. I just thought I would raise the concern for you regarding the potentially bad table structure.
I totally get it and ty for ur clarification
i would like u to just test the input mask (my pc date configuration works like : dd/mm/yyyy)
 

Attachments

  • {542D59A6-C402-4D94-97EE-EB45CB8559F0}.png.jpg
    {542D59A6-C402-4D94-97EE-EB45CB8559F0}.png.jpg
    12.3 KB · Views: 113

Isaac

Lifelong Learner
Local time
Yesterday, 21:16
Joined
Mar 14, 2017
Messages
8,777
The problem with MS access cause i did the same type of input masks with other months and works fine but February programming code has some issue from Microsoft
Well no, I don't agree with that....It's not that February programming code has an issue from Microsoft. It's that 2/29/2019 isn't a date.
But I think your most recent post has acknowledged that, so we may be good there..
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:16
Joined
Oct 29, 2018
Messages
21,471
I totally get it and ty for ur clarification
i would like u to just test the input mask (my pc date configuration works like : dd/mm/yyyy)
Hi. I have tested your input mask and it worked for me when I entered any of the following years:
1980
1988
2004
2020

It doesn't work when I entered:
1985
2015
2021
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Well no, I don't agree with that....It's not that February programming code has an issue from Microsoft. It's that 2/29/2019 isn't a date.
But I think your most recent post has acknowledged that, so we may be good there..
I get it , but my PC Date configuration : like dd/mm/yyyy so it's should worked fine! an error will be definitely addressed if my PC date confg like mm/dd/yyyy and I'm trying to use the input mask :
"29"/\2/0000;0;
And also all other months with same date confg (dd/mm/yyyy) works fine so the issue probably with Microsoft
 

Isaac

Lifelong Learner
Local time
Yesterday, 21:16
Joined
Mar 14, 2017
Messages
8,777
Let me see if I can say it a different way.
I am not referring at all, to date formats (like dd/mm/yyyy, vs. yyyy-mm-dd, vs. dd-mm-yyyy). Totally unrelated.

I am suggesting that when you attempt to enter ANYTHING that is meant to represent the 29th day of February, the year 2019, the reason Access is rejecting it, is because such a date is invalid - it doesn't exist - anywhere in the world - under any configuration, input mask, or date format.

Leap years are only once every 4 years. On non-leap years (like 2019), February only has 28 days.
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Hi. I have tested your input mask and it worked for me when I entered any of the following years:
1980
1988
2004
2020

It doesn't work when I entered:
1985
2015
2021
Wow that's really a big issue Microsoft did!...
and also 2019 doesn't work! and maybe more years who knows :(

Tnx again <3
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Let me see if I can say it a different way.
I am not referring at all, to date formats (like dd/mm/yyyy, vs. yyyy-mm-dd, vs. dd-mm-yyyy). Totally unrelated.

I am suggesting that when you attempt to enter ANYTHING that is meant to represent the 29th day of February, the year 2019, the reason Access is rejecting it, is because such a date is invalid - it doesn't exist - anywhere in the world - under any configuration, input mask, or date format.

Leap years are only once every 4 years. On non-leap years (like 2019), February only has 28 days.
Ty for ur clarification i didn't get it when u say leap/non-leap change every 4 years but now i totally get it Ty u so much Again <3
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:16
Joined
Oct 29, 2018
Messages
21,471
Wow that's really a big issue Microsoft did!...
and also 2019 doesn't work! and maybe more years who knows :(

Tnx again <3
Yeah, Microsoft didn't do that. Whoever made Leap Years did. :)
 

Isaac

Lifelong Learner
Local time
Yesterday, 21:16
Joined
Mar 14, 2017
Messages
8,777
Ty for ur clarification i didn't get it when u say leap/non-leap change every 4 years but now i totally get it Ty u so much Again <3
Glad to help. Good luck with the project & the input masks.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:16
Joined
Feb 19, 2002
Messages
43,266
Remove the input mask entirely and use a button to store the date. In the click event, take the current year concatenated to march 1 and then subtract one day. That will give you the last day of February which will be the 28th or 29th depending on whether year is a leap year or not. OR since the actual month and day seem to be irrelevant, just store the year.
 

MicroAbdel

New member
Local time
Yesterday, 21:16
Joined
Aug 9, 2020
Messages
26
Remove the input mask entirely and use a button to store the date. In the click event, take the current year concatenated to march 1 and then subtract one day. That will give you the last day of February which will be the 28th or 29th depending on whether year is a leap year or not. OR since the actual month and day seem to be irrelevant, just store the year.
Damn bro i want to reply to u and i clicked the wrong button xD sry for that
 

Users who are viewing this thread

Top Bottom