This is where the joy of date and time come into play. 4D does not seem to define dates, instead its setup where a year can be anything between 0 and 32,767. Beyond stating that they seem to be saved as a month/Day/year format where the ranges can vary widely. The problem is that I have dates that are stored as two year dates, but do not show as a two year date. As a result of the fact that 4D was storing dates as 2 digit years I have people who are now showing up as being born in the year 2032 and having died in 1987. Things that make you say Hmmm. The problem is that the pivot date has moved and while its now defaulted at 2030 it didn't always do that. What I am looking for is a way to search for a 2 digit year to be able to flag them to be corrected to a proper 4 digit year. This way I can clean up the old Y2K nightmare that has never been able to be identified and caught. -----------------------------------------------------------------------
MacCafe 4405 Talmadge St. Toledo, OH 43623 Eric Naujock - ACSA 10.2, 10.3, 10.4 Apple - ACTC 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 http://www.mac-cafe.com email: e <mailto:[email protected]>[email protected] <mailto:[email protected]> AOL IM: erlic > On Aug 25, 2016, at 10:55 AM, Koen Van Hooreweghe <[email protected]> > wrote: > > Hi Eric, > > IMHO this question does not makes sense. Dates are not stored with 2, 4 or > whatever number of year digits. Dates are stored as... euhm... well...: dates! > > I guess you might have problems caused by imported dates from a text source > which did not include the century info. This way you can have dates in the > year 16 instead of 2016. > Those should be easily found with a simple query like (from the top of my > head): > > //to be OS date settings independent: > $date:=!0!//4d method editor will expand > $date:=add to date($date;1000;1;1)//or whatever year you think will be > incorrect, in this case everything before januari first 1000 > query([myTable];[myTable]myDate < $date) > > HTH > Koen > > Op 25-aug.-2016, om 16:22 heeft Eric Naujock <[email protected]> het volgende > geschreven: > >> Is there a simple way to detect 2 digit years stored in the 4D database. >> Much less be able to fix the 2 digit year and convert it to a proper 4 digit >> year. I Had a utility that would try to convert is using the following. The >> code runs on 4D v15.2 > > > > -------------------- > Compass bvba > Koen Van Hooreweghe > Kloosterstraat 65 > 9910 Knesselare > Belgium > tel +32 495 511.653 > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

