Title: Frontend Display Data Create Date
Last modified: May 13, 2021

---

# Frontend Display Data Create Date

 *  Resolved [sovitor](https://wordpress.org/support/users/sovitor/)
 * (@sovitor)
 * [5 years ago](https://wordpress.org/support/topic/frontend-display-data-create-date/)
 * Hi guys,
 * Is there a way to automatically show the line insertion date on the frontend?
 * Example
    [Ninjaforms](https://www.lass-aus.com.au/ninjaforms.png)
 * Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Support [Syed Numan](https://wordpress.org/support/users/annuman/)
 * (@annuman)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/frontend-display-data-create-date/#post-14631598)
 * Hello [@sovitor](https://wordpress.org/support/users/sovitor/),
 * Yes, it is possible with a custom PHP snippet.
 * First, you need to insert the following PHP snippet in the themes’ functions.
   php file. Then, create a column in the ninja table and keep the [Column Key](https://prnt.sc/190t0j5)
   as “created_at”, also, you can take another column with Column Key “updated_at”
   for setting rows updated date and time.
 *     ```
       add_filter('ninja_tables_item_attributes', function ($attributes) {
           $values = json_decode($attributes['value'], true);
   
           if(isset($values['created_at']) && !$values['created_at']) {
               $values['created_at'] = date('Y-m-d h:i A', current_time('timestamp'));
               $attributes['value'] = json_encode($values, JSON_UNESCAPED_UNICODE);
           }
   
           if(isset($values['updated_at'])) {
               $values['updated_at'] = date('Y-m-d h:i A', current_time('timestamp'));
               $attributes['value'] = json_encode($values, JSON_UNESCAPED_UNICODE);
           }
   
           return $attributes;
       });
       ```
   
 * `
    Just keep those columns blank and the date and time will be updated automatically
   when create a new row or update a row.
 * If you have any further queries please submit a support ticket here. [https://wpmanageninja.com/support-tickets/](https://wpmanageninja.com/support-tickets/)
   Our support agent will assist you.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Frontend Display Data Create Date’ is closed to new replies.

 * ![](https://ps.w.org/ninja-tables/assets/icon-256x256.png?rev=3337819)
 * [Ninja Tables – Easy Data Table Builder](https://wordpress.org/plugins/ninja-tables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninja-tables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninja-tables/)
 * [Active Topics](https://wordpress.org/support/plugin/ninja-tables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninja-tables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninja-tables/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Syed Numan](https://wordpress.org/support/users/annuman/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/frontend-display-data-create-date/#post-14631598)
 * Status: resolved