Is there any “easy†way to get around limitations of “date†type (to dates from 01-01-1900) while maintaining ability to sort on date and use various display dates formats?
Or is it easier just to throw in the towel and simply fallback to just using a numeric field for the year for my needs in the “people†table where I have individuals born from the 1500s?
Birthdates prior to 1900
-
- Veteran Member
- Posts: 31
- Joined: 2018-01-04 18:32
- Location: Vancouver, Canada
- Contact:
Birthdates prior to 1900
David HC Soul
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
- Celson Aquino
- Posts: 27
- Joined: 2017-08-26 15:40
- Location: Salvador, Bahia - Brazil
Re: Birthdates prior to 1900
I think the limits for year have to do with the DATE type on MySQL database. The year range is 1901 to 2155 if I am not mistaken.
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: Birthdates prior to 1900
As long as you use the full 4 digit date I believe there is no real restriction.
To prove this, I made a small database and use the date of ( 1018-01-10 ) exactly 1000 years ago.
Two digit year dates do have restrictions as it does not realise what century you require
To prove this, I made a small database and use the date of ( 1018-01-10 ) exactly 1000 years ago.
Two digit year dates do have restrictions as it does not realise what century you require
- Celson Aquino
- Posts: 27
- Joined: 2017-08-26 15:40
- Location: Salvador, Bahia - Brazil
Re: Birthdates prior to 1900
What data type in AppGini did you use for this field?baudwalker wrote: ↑2018-01-10 11:19As long as you use the full 4 digit date I believe there is no real restriction.
To prove this, I made a small database and use the date of ( 1018-01-10 ) exactly 1000 years ago.
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: Birthdates prior to 1900
As we learned from the Y2K crisis/scare, the use of two-digit years is a VERY bad practice.
The solution to the problem is to always require and use four-digit years.
(Of course, this will only be a valid solution until the Y10K crisis comes along, but by then who will be around to care!)
The solution to the problem is to always require and use four-digit years.
(Of course, this will only be a valid solution until the Y10K crisis comes along, but by then who will be around to care!)
-
- Veteran Member
- Posts: 31
- Joined: 2018-01-04 18:32
- Location: Vancouver, Canada
- Contact:
Re: Birthdates prior to 1900
That is the crux of the problem; I see no option within MySql therefore no work around in AppGini?Celson Aquino wrote: ↑2018-01-10 12:08What data type in AppGini did you use for this field?baudwalker wrote: ↑2018-01-10 11:19As long as you use the full 4 digit date I believe there is no real restriction.
To prove this, I made a small database and use the date of ( 1018-01-10 ) exactly 1000 years ago.
David HC Soul
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: Birthdates prior to 1900
yes I see what you mean. The ridicules date picker is the problem. it has a built-in restriction. MySQL will accept all 4 digit year dates.
As for after 9999-12-31 I would think there would be a better data structure by then.
The so-called 2YK bug was nothing more than a scam. I had an old XT running XP and it clocked over perfectly. but suddenly computer from around the mid 1990s had the problem inbuilt. funny that!
As for after 9999-12-31 I would think there would be a better data structure by then.
The so-called 2YK bug was nothing more than a scam. I had an old XT running XP and it clocked over perfectly. but suddenly computer from around the mid 1990s had the problem inbuilt. funny that!
-
- Veteran Member
- Posts: 31
- Joined: 2018-01-04 18:32
- Location: Vancouver, Canada
- Contact:
Re: Birthdates prior to 1900
No, it is not a DatePicker Problem.baudwalker wrote: ↑2018-01-11 01:01yes I see what you mean. The ridicules date picker is the problem. it has a built-in restriction. MySQL will accept all 4 digit year dates.
As for after 9999-12-31 I would think there would be a better data structure by then.
The so-called 2YK bug was nothing more than a scam. I had an old XT running XP and it clocked over perfectly. but suddenly computer from around the mid 1990s had the problem inbuilt. funny that!
The solution:
The DateTime field time allows dates prior to 1900;
The incredibly useful AppGini “Search Page Maker†plugin handles my use case/need as it masks complexity of proper date formatting to “lay person†user in search in the data base.
(DatePicker doesn’t work for initial input choice but does for Filter selection)
ps. baudwalker you are wrong on Y2K but that is a “political†discussion for a different forum/debate
Thanks for your notes though, as they led me to a more thorough review of MySql threads on coders websites that spoke “plain English†rather than technical manual speak I got from MySQl itself!
David HC Soul
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
Core::AppGini 5.93
Plugins: Search Page Maker + Summary Reports + Mass update plugin
Bizzworxx: AppGini Helper JavaScript Library + AppGini Helper Detail View Plug-in + AppGini Helper pack
Utilities: Global Search utility
Re: Birthdates prior to 1900
baudwalker - if you would like to edit the restrictions on the datepicker dropdown, just open the generated yourtablename_dml.php and search/find the section(s) that apply to your date comboboxes for each individual table.
Search for and edit these two default lines in each date combobox instance you'd like to change to whatever year ranges you'd like to be able to select from:
$combo_referred->MinYear = 1900;
$combo_referred->MaxYear = 2100;
eg - this will allow selection in the dropdown from years 1200 to 2990:
$combo_referred->MinYear = 1200;
$combo_referred->MaxYear = 2990;
You can of course then type the desired year into the year textbox and it will be selected in the dropdown rather than having to scroll through 1,000 or more years.
Search for and edit these two default lines in each date combobox instance you'd like to change to whatever year ranges you'd like to be able to select from:
$combo_referred->MinYear = 1900;
$combo_referred->MaxYear = 2100;
eg - this will allow selection in the dropdown from years 1200 to 2990:
$combo_referred->MinYear = 1200;
$combo_referred->MaxYear = 2990;
You can of course then type the desired year into the year textbox and it will be selected in the dropdown rather than having to scroll through 1,000 or more years.
Re: Birthdates prior to 1900
Long time ago .. but quite new to AppGini and thx for that !
Just have to think of changing after new generation of code.
Just have to think of changing after new generation of code.