(defparameter d
(multiple-value-bind (seconds minutes hours day month year day-of-the-week daylight-savings-time-p time-zone)
(get-decoded-time)
(declare (ignorable day-of-the-week daylight-savings-time-p time-zone))
(format nil "~D-~2,'0D-~2,'0D ~2,'0D:~2,'0D:~2,'0D~%" year month day hours minutes seconds))
"The current date and time as a string value.")
GET-DECODED-TIME returns 9 values. We capture them all in MULTIPLE-VALUE-BIND. I chose to ignore day-of-the-week , daylight-savings-time-p , and time-zone , but they are still bound.
Note that Lisp's FORMAT specifier string is very different from most other languages!
Note that Lisp's FORMAT specifier string is very different from most other languages!