This sounds suspiciously like school homework
If so, my suggestion is to ask your teacher for help. If s/he didn't provide you with the necessary resources to do this assignment, then you should ask for assistance from them.
If this is not homework, then perhaps you could elaborate a bit: does the date/time need to be printed before every line of output, or just at the beginning? And how is it that the PATH environment variable would change during the course of this script?