# Dynamic Column Headers

**URL:** <https://pug.phocassoftware.com/t/dynamic-column-headers/702>\
**Category:** Ask the Community\
**Created:** [September 5, 2018, 12:56pm UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702 "2018-09-05T12:56:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim.janes](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/tim.janes/32/361_2.png) [@tim.janes](https://pug.phocassoftware.com/u/tim.janes)\
**Post date:** [September 5, 2018, 12:56pm UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702/1 "2018-09-05T12:56:49Z")

</div>

Would it be possible to have dynamic column headers on queries in Custom Mode? For example, I would like to have column headings that say “Sales for MM/YY” that would automatically update as time moves forward. So, if I was looking at current month sales it would say “Sales for 09/18”, and next month it would read “Sales for 10/18”, all without me having to touch it each month.  
I would imagine this would work something like the offset function while specifying date ranges.

---

<div class="post-metadata">

**Author:** ![jason.law](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/jason.law/32/92_2.png) [@jason.law](https://pug.phocassoftware.com/u/jason.law)\
**Post date:** [September 5, 2018, 2:22pm UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702/2 "2018-09-05T14:22:58Z")

</div>

Hi Tim,

This is already supported in the product by using the {FDATE} and {TDATE} placeholders for the period captions. At runtime, these return the ‘From Date’ and ‘To Date’ of each period in MMM YYYYY format, like this;

 ![image](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/1X/4fa24a12eab2b13cf0df77ff66013e7abd78e2a6.png)

If the custom column is using a range of offsets, you could have a dynamic caption by using “Sales {FDATE} to {TDATE}”, which would look like this at runtime;

![image](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/1X/875d20da69b0a4d6757f5d5ac2732b28f707558a.png)

This technique is covered in the documentation (in the section ‘Note about column names’); [https://help.phocassoftware.com/display/userdoc/Custom+mode](https://help.phocassoftware.com/display/userdoc/Custom+mode)

---

<div class="post-metadata">

**Author:** ![tim.janes](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/tim.janes/32/361_2.png) [@tim.janes](https://pug.phocassoftware.com/u/tim.janes)\
**Post date:** [September 5, 2018, 5:24pm UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702/3 "2018-09-05T17:24:11Z")

</div>

Thanks, Jason! Works like a charm for any date format. I tried it as a custom by day, too. I appreciate it! I moved this into the Tips and Tricks category, since it’s not something that needs to be developed.

---

<div class="post-metadata">

**Author:** ![ShaneAngel](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/shaneangel/32/68_2.png) [@ShaneAngel](https://pug.phocassoftware.com/u/ShaneAngel)\
**Post date:** [September 6, 2018, 11:22pm UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702/4 "2018-09-06T23:22:36Z")

</div>

I recently discovered {tdate} in the latest Phocas Webinar in the past couple of weeks, nice little gem.

---

<div class="post-metadata">

**Author:** ![Muecke](https://sea1.discourse-cdn.com/flex015/user_avatar/pug.phocassoftware.com/muecke/32/505_2.png) [@Muecke](https://pug.phocassoftware.com/u/Muecke)\
**Post date:** [February 20, 2020, 10:47am UTC](https://pug.phocassoftware.com/t/dynamic-column-headers/702/5 "2020-02-20T10:47:47Z")

</div>

This topic is already a little older, but my anligen similar is, I insert myself here.

Is there a further development of the placeholder?  
for example  
Filter Type  
Filter Result  
there would be some useful things in it.

Greeting Mücke

 ![001](https://us1.discourse-cdn.com/flex015/uploads/phocassoftware/original/1X/06f2573a792abeb1b3aab1537e16bfab7699be55.png)
