Here you go made u a quick example. Also added some comments inside hope it makes sense to you.
seconds to minutes to C2/C3
see also old construct classic thread explaining this seconds to minutes to and stackoverflow seconds to minutes to to better understand how it works.
I didn't use a function, but i used some variables and the calculation of how seconds are converted to minutes to hours and days etc... if u need weeks u just do weeks=floor( number / 604,800) if u need months that is a tricky one cause months aren't the same all year. but to get an average 28 days a month u just do month = floor(number /2,419,200)
Have fun, and hope it's what you're looking for.