Make new folder with item's creation date as default name

Hello! I’m trying to create an Automator service that receives multiple files in Finder and creates a folder from them, but writes in the naming dialogue by default the first item’s creation date.
How can I define “input” as the first item of the selection?

What am I missing here?

service receives files or folders in Finder
get folder contents
run AppleScript

tell application "Finder"
	set theFileDate to (creation date of input as string)
	make new folder at window 1 with properties {name:text returned of (display dialog "Choose a name" default answer theFileDate)}
	move selection to the result
end tell