[{"data":1,"prerenderedAt":47},["ShallowReactive",2],{"lesson-shell:dates\u002Fdatedif:en":3},{"id":4,"who":5,"role":6,"image":7,"text":8},"datedif","Wei Chen","owns Spark & Shine Cleaning","\u002Fpersona\u002Fwei.webp",{"none":9,"win":35,"mac":41},{"title":10,"story":11,"steps":12},"Years with the company","Wei wants to thank his team. Some people have worked for him for many years. Their start dates are in three formats on old paper forms. Now the dates are in Excel, and Wei wants the years and months for each person.",[13,26],{"id":14,"title":15,"intro":16,"how":17,"example":24,"task":25},"years","Count full years with DATEDIF","DATEDIF counts the time between two dates. With \"y\", it counts the full years.",[18,19,20,21,22,23],"Select the cell for the result.","Type =DATEDIF( and the earlier date and the later date, with commas.","Type the unit in quotes and a closing bracket.","Press Enter.","Other units: \"m\" counts full months, \"d\" counts days.","To copy the formula down, write today as $I$4.","=DATEDIF(C5,I4,\"y\")","Count the full years for Grace. Put the result in cell D7.",{"id":27,"title":28,"intro":29,"how":30,"example":33,"task":34},"months","Count the months after the full years","With \"ym\", DATEDIF counts the months after the last full year. Years and months together give the full time.",[31,32,21],"Click cell E5.","Type the same formula with the unit \"ym\".","=DATEDIF(C5,I4,\"ym\")","Count the extra months for Tomasz. Put the result in cell E6.",{"title":10,"story":11,"steps":36},[37,39],{"id":14,"title":15,"intro":16,"how":38,"example":24,"task":25},[18,19,20,21,22,23],{"id":27,"title":28,"intro":29,"how":40,"example":33,"task":34},[31,32,21],{"title":10,"story":11,"steps":42},[43,45],{"id":14,"title":15,"intro":16,"how":44,"example":24,"task":25},[18,19,20,21,22,23],{"id":27,"title":28,"intro":29,"how":46,"example":33,"task":34},[31,32,21],1795376395358]