[thelist] SQL query help: dates
Joshua Olson
joshua at waetech.com
Thu Feb 17 15:55:28 CST 2005
> -----Original Message-----
> From: Joshua Olson
> Sent: Thursday, February 17, 2005 3:31 PM
>
> I think the appropriate course of action would be to use the
> date functions
> provided by the database (datediff, for example) to calculate
> the person's
> next birthday.
>
> Something like this (syntax untested, but hopefully it's clear):
>
> DateAdd("yyyy", DateDiff("yyyy", birthday, Now()) + 1, Now())
Dang typos...
Should be:
DateAdd("yyyy", DateDiff("yyyy", birthday, Now()) + 1, birthday)
Sorry bout that, (still simpler than AB's solution :-) )
<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168
More information about the thelist
mailing list