If you are talking about naming the file before it is "submitted" or uploaded to SharePoint, its a InfoPath setting.
Use the "now()" function.
For instance, our infopath forms are concatenated with the datetime in the format of yyyymmddhhmmss to assure unique names.
concat(substring(now(), 1, 4), substring(now(), 6, 2), substring(now(), 9, 2), substring(now(), 12, 2), substring(now(), 15, 2), substring(now(), 18, 2))