# date format

**URL:** <https://forum.ansible.com/t/date-format/14843>\
**Category:** Ansible Project\
**Created:** [March 24, 2014, 3:01pm UTC](https://forum.ansible.com/t/date-format/14843 "2014-03-24T15:01:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSS](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@KSS](https://forum.ansible.com/u/KSS)\
**Post date:** [March 24, 2014, 3:01pm UTC](https://forum.ansible.com/t/date-format/14843/1 "2014-03-24T15:01:54Z")

</div>

Hi,

I have a situation where I need to use the three letter abbreviation for the current month (i.e. Mar for March) rather than the numeric representation.

Besides using the shell or command module to register it as a variable. Is it possible to somehow get this directly in a jinja2 template or a vars file?

---

<div class="post-metadata">

**Author:** ![Timothy\_Appnel](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Timothy\_Appnel](https://forum.ansible.com/u/Timothy_Appnel)\
**Post date:** [March 24, 2014, 5:22pm UTC](https://forum.ansible.com/t/date-format/14843/2 "2014-03-24T17:22:08Z")

</div>

Sounds like something Jinja2 can handle pretty easily.

[http://stackoverflow.com/questions/4830535/python-how-do-i-format-a-date-in-jinja2](http://stackoverflow.com/questions/4830535/python-how-do-i-format-a-date-in-jinja2)

\<tim/\>

---

<div class="post-metadata">

**Author:** ![KSS](https://avatars.discourse-cdn.com/v4/letter/k/a587f6/32.png) [@KSS](https://forum.ansible.com/u/KSS)\
**Post date:** [March 25, 2014, 7:48am UTC](https://forum.ansible.com/t/date-format/14843/3 "2014-03-25T07:48:31Z")

</div>

Hi Tim, thanks for the reply. I’ve looked at that prior to posting. Unfortunately, I can’t get it working.

Does anyone have an example showing me how to do this?
