I want to show all the current birthdays in my CRM in a list of my startup window from, say: today and the next seven days. For that I do use a field that holds all the IDs of the contacts and a the contacts do relate to this list of IDs. The birthdays look like "01.02.2016".
To get the IDs of the contacts that do have birthday in the next days I use an eSQL-statement - but this ne here does not work in two ways:
- I do also get "old" birthdays before today
- they do not sort correctly
SQLAusführen ( "
( Day ( birthday ) >= ? OR Day ( birthday ) <= ? )
Month ( birthday ) = ?
Day ( birthday )
; "" ; ""
; WochentagZahl ( Hole ( SystemDatum ) )
; WochentagZahl ( Hole ( SystemDatum ) ) + 7
; MonatZahl ( Hole ( SystemDatum ) )