Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anniversary/birthday reminders
Message
 
À
05/04/2005 10:40:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01001497
Message ID:
01001692
Vues:
20
Hi Frank

Because the start year and end year may be different you need to test your month and day against both ends seperately.

Try this
m.d_start = DATE(2004,10,15)
m.d_end = DATE(2005,04,15)

SELECT dob as dactivity, client_no, PADR("Birthday", 20) as cType;
	FROM c_clientlist;
	WHERE DATE(YEAR(m.d_start),MONTH(dob),DAY(dob)) >= m.d_start AND ;
			DATE(YEAR(m.d_end),MONTH(dob),DAY(dob)) <= m.d_end
Geoff

>Hi,
>
>I've gone brain dead :(
>
>I have some SQL code:
>
>
>SELECT dob as dactivity, client_no, PADR("Birthday", 20) as cType;
>	FROM c_clientlist;
>	WHERE DAY(dob) = DAY(DATE()) AND MONTH(dob) = MONTH(DATE())
>
>
>which will give me anybody who was born on the current day.
>
>Say I wanted to allow the user to enter a starting date and an ending date and then I will pull out all people who have birthdays falling within that range.
>
>How do I convert this to work on a range of dates?
May all your weeds be wildflowers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform