Convert a date format in logstash pipeline

can i create a template where i define my mapping then use it in the pipeline configuration ???