I use a timer to acquire the pH from a pH-meter all the time. I want to save the pH during 30 days (3 times per day at 8:00 am, 16:00 pm and 24:00 pm), and then restart a new period of 30 days and so on.
GetSystemTime will return to you the time. Check for when the time crosses the three points each day and save the data. Do that 90 times and you will have a 30 day interval.