You want to put the date and time in the title of the window that pops up, or do you want the name of the directory to contain the date and/or time?
For getting the date/time into a string, you might look at strftime() and you should probably also consider calling mkdir() instead of system("mkdir ...") to create the directory.