Hi,
Did You try to find similar functions on
http://www.oscat.de There You can find open and free to download source code for Step7. Some interesting functions for You can be SCHEDULER, SCHEDULER_2, SEQUENCE_4... (chapter 15.3, 15.4...), many Time&Date and Clock Generator functions. Drawback is that description is in German language, but with aid of some online language translator You can solve even this little problem.
regards