Drew Wutka
DWUTKA at marlow.com
Sat Feb 1 16:06:06 CST 2003
This is from a data entry point of view, right? Because dates are stored as numbers, so the 1930 to 2029 issue is a moot point. You can tackle this in one of two ways, at least that I can think of right now. The first way is to get your data entry folks to use 4 year data entry, especially for earlier dates. The second way is to just programmatically check the user. On the Before Update event, put the following: dim tmpDate as date tmpDate=Me.PatDate if tmpDate>date() then tmpdate=dateserial(year(tmpdate)-100,month(tmpdate),day(tmpdate) me.PatDate=tmpDate end if The only issue you may run into, is a leap year, but since your 'moving' the date by a century, that shouldn't be much of an issue. Drew -----Original Message----- From: Scott Gage [mailto:scotttgage at yahoo.com] Sent: Saturday, February 01, 2003 3:46 PM To: accessd at databaseadvisors.com Subject: [AccessD] Date Format I am having a problem formatting a Date of Birth when the data uses the "mm/dd/yy" format I want to use the following code Format([PatDob],"yyyymmdd") to format the data in the form required for another application and everything works fine except when I encounter someone born before 1930. My code turns 11/01/29 into 20291101 but it turns 11/02/30 into 19301102 like I want. any suggestions? ===== -------------------- Scott T. Gage Scott.gage at promedica.org 419.291-7177 __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com