Birthday Reminder

bekio
bekio Member Posts: 204
I have an employee XX YY with birthday 13/04/1980(DD/MM/YYYY), I have created a form, and today date is 25/03/2010. I want that form to display me just records(employe) that have birthday at least 5 days after today date.
Can some one help me about, how to do that.


Thanks.

Answers

  • matttrax
    matttrax Member Posts: 2,309
    Just filter on the Date. The filter would be > WORKDATE + 5
  • kapamarou
    kapamarou Member Posts: 1,152
    Either loop through the all records, calculate the birthday and show the correct ones, or create new fields for Day and Month of birthday and filter on these fields.
  • bekio
    bekio Member Posts: 204
    I have created form, and i want that form to display me all the employees in range of
    15 days forward.
    e.g. Employee XXX have the birthdate = 13/04/1980 and employee YYY have the birthdate=05/04/1985
    Lets say that today date is 25/03/2010.

    I want that form to display me those employee XXX and YYY.
    Can you help me with function how to filter that form.
  • Sunset
    Sunset Member Posts: 201
    Set a filter when you open the form

    Look at form 42 for inspiration
    Don't just take my word for it, test it yourself
  • bekio
    bekio Member Posts: 204
    I know how to set a filter on open Form but i don't to calculate date.
  • Savatage
    Savatage Member Posts: 7,142
    did you look at this:
    http://www.mibuso.com/dlinfo.asp?FileID=1163
    Little useful function for human resource management.
    Helps you not to forget employees' important events. It can be used by HR and management stuff to plan motivation events or birthday parties.
  • Sunset
    Sunset Member Posts: 201
    NewDate := CALCDATE(DateExpression [, Date])


    NewDate := CALCDATE('5D', TODAY)
    then NewDate is 5 days in the future

    setfilter("Next Birthday", '%1..%2', TODAY, CALCDATE('14D', TODAY))
    Will result in a filter where "Next Birthday" needs to be between today and 14 days.
    Don't just take my word for it, test it yourself
  • dahon716
    dahon716 Member Posts: 5
    use temporary record
    parse your day and month
    check your birthday month and day against the your current day +-5
    insert the record to your temp table
    populate the form using temp records
    hope this helps.