lennard
08-27-2006, 02:55 AM
For a local intranet I like to have a list of people who celebrates there birthdays within the next week.
The next code is calculating all birthdays within the next week. The problem is that it is presented in the format dd-mm-yyyy. As you can imagine the ladies don't like it when the year of birth is presented. It seems that changing the format in my Access database is not changing the result of the asp page.
Question: How can I just present dd-mm on my asp page?
Table: Perman
Field: Geboortedatum (Birthday)
SQL query:
SELECT Perman.Geboortedatum, DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")) AS Verschil
FROM Perman
WHERE (((DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")))>=0 And (DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")))<=7));
The next code is calculating all birthdays within the next week. The problem is that it is presented in the format dd-mm-yyyy. As you can imagine the ladies don't like it when the year of birth is presented. It seems that changing the format in my Access database is not changing the result of the asp page.
Question: How can I just present dd-mm on my asp page?
Table: Perman
Field: Geboortedatum (Birthday)
SQL query:
SELECT Perman.Geboortedatum, DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")) AS Verschil
FROM Perman
WHERE (((DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")))>=0 And (DateDiff("d",Format(Day([Geboortedatum]) & "-" & Month([Geboortedatum]) & "-" & Year(Date()),"dd/mm/yyyy"),Format(DateAdd("y",7,Date()),"dd/mm/yyyy")))<=7));