On 3/18/01, James Watkins penned:
>I use the following code to determine if a person is under 30 years old.
>Problem is I must remember to update every year. Is there a better way to
>count back from the current date 31 years and replace the '31-DEC-1973' hard
>code?
>
><!--- Oracle SQL code --->
>WHEN spbpers_birth_date>=to_date('31-DEC-1973','dd-mon-yyyy')
Haven't worked with oracle, but a standard SQL call would be:
WHERE spbpers_birth_date >= #createodbcdate(dateadd('YYYY', -30, now()))#
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists