Putting the date in a file name
I often need to create file names that include the date & time the file was created in the name. I"™ve come up with all sorts of ways to do but this I think is the simplest. I want the date in this format: year-month-day-hour-minute-second. In other words a format that is easily sortable. I discovered that if you convert a data to a string there is a formatter that does most of the work for you.