Yes, it looks like strftime() should do the job for you. Remember, you can combine the format specifiers to customize your own string.
For that matter, your example can combined into one statement:
Look up the format specifiers in your help/manpage system. If none of them exactly matches what you want, then create it; eg, for your "dd-mm-yyyy hh:mm:ss" string:
Comparing a few different listings of the format specifiers, I found that not all the help-file/man-page listings were complete. So do a Google search on strftime and play with it until you get what you want.