Title: date functions tutorial
Last modified: August 21, 2016

---

# date functions tutorial

 *  Resolved [jhanjon](https://wordpress.org/support/users/jhanjon/)
 * (@jhanjon)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/date-functions-tutorial/)
 * Hi Tobias,
 * I’ve been using reloaded and would like to switch to Table Press. I will need
   to get into date formats and wonder if there’s a tutorial to guide me, or a sample
   table source I can glance at?
 * A quick question is whether it will I be able to format via PHP date formatting?
   So serial date becomes Monday, July, 9, 2014?
 * Speaking of which, is this a clock based serial date, or a randomly inserted 
   date in a specific format bearing no relation to real world clock?
 * This is for a non profit swim sports club.
 * Joe
 * [http://wordpress.org/plugins/wp-table-reloaded/](http://wordpress.org/plugins/wp-table-reloaded/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/date-functions-tutorial/#post-4257531)
 * Hi,
 * thanks for your question.
 * TablePress (just as WP-Table Reloaded) does not really have anything related 
   to “date formats” built in. To TablePress, all cell content is just text, so 
   that it does not recognize whether something is a date (in whatever format) or
   a number or link or just text.
    This does however become of interest when it 
   gets to sorting such data in the generated table, that a site visitor is seeing.
   The JS library that does the sorting does recognize some common formats, for 
   dates that will be everything that JavaScript understands by default. The most
   common one probably is mm/dd/yyyy.
 * Now, I don’t really understand your question with “clock based serial date” and“
   real world clock”. Can you maybe clarify on that, maybe with an example?
 * Also, what exactly are you trying to do with dates or time values? Will those
   be part of your tables? I can imagine the results of some swim competion, maybe?
 * Regards,
    Tobias
 *  Thread Starter [jhanjon](https://wordpress.org/support/users/jhanjon/)
 * (@jhanjon)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/date-functions-tutorial/#post-4257628)
 * Thanks Tobias, yes, the results and the swim meets are calendar based and need
   to be sorted by date. By real date I mean the date as represented by the server
   clock based on its time zone, whether “time” “date” “now”. In PHP this date can
   be formatted to display a variety of formats.
 * The JS library may be sufficient since it’s the sorting I need but having access
   to the server date may allow a filtering of showing events from “now” meaning
   upcoming events.
 * In any case if there’s a tutorial or some sample with code exposed which will
   allow me to figure it out easily would be appreciated.
 * Joe
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/date-functions-tutorial/#post-4257641)
 * Hi Joe,
 * I’m not sure, if I understand completely. So you would like to use some sort 
   of dynamic date in your tables? Are the dates in your tables not simply typed
   in?
 * TablePress does not have native functions for that, but you might then be able
   to achieve this by using PHP in table cells. This is not enabled by default, 
   but there is a TablePress Extension for it at [http://tablepress.org/extensions/php-in-tables/](http://tablepress.org/extensions/php-in-tables/)
   that should be helpful here. With that, you could simply use PHP’s `date()` function.
 * Additionally, you’ll then likely want to turn off TablePress’s internal outout
   caching, by extending the Shortcode with another parameter, to
 *     ```
       [table id=123 cache_table_output=false /]
       ```
   
 * Depending on how the dates then look like, you’ll probably have to adjust the
   JavaScript library’s sorting algorithms with some custom ones. The TablePress
   Extension at [http://tablepress.org/extensions/datatables-sorting-plugins/](http://tablepress.org/extensions/datatables-sorting-plugins/)
   should be a good starting point for that.
 * Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘date functions tutorial’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-table-reloaded_f7dcd3.svg)
 * [WP-Table Reloaded](https://wordpress.org/plugins/wp-table-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-table-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-table-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-table-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-table-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-table-reloaded/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)
 * [time](https://wordpress.org/support/topic-tag/time/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/date-functions-tutorial/#post-4257641)
 * Status: resolved