Does anyone have a quick and easy way to parse the return from a function? I'm using the PJRC time library and need to grab a 2-digit year out of the 4 digit number returned by the *.year function.
t = rtc.getTime();
sunup[0] = 0;
sunup[1] = 0;
sunup[2] = 12;
sunup[3] = t.date; //Updates to current RTC day
sunup[4] = t.mon; //Updates to current RTC month
sunup[5] = t.year; //This is the problem area. Currently will return "2016" and I need to grab only the last two digits of the return.
Thanks for any suggestions.