Title: Shortcode cfdb-html &#8211; Formatting Date
Last modified: August 31, 2016

---

# Shortcode cfdb-html – Formatting Date

 *  Resolved [mar2195](https://wordpress.org/support/users/mar2195/)
 * (@mar2195)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/)
 * I clicked thru as many Support pages as I could to find the answer to this without
   any success. Apologies if you’ve answered this before.
 * When using the “cfdb-html” shortcode, using the code: ${submit_time}
    The output
   is the UNIX timestamp – EX: 1459110113.0940
 * I’m trying to format this in the manner used with the shortcode: cfdb-table
    (
   ie: 2016-03-27 16:21:53 -04:00 ) … or formatted to my liking.
 * How do I accomplish this?
 * Also… when using the “cfdb-html” shortcode, is this variable: ${submit_time}
   –
   unique to CFDB? – PHP? – jQuery? – ??
 * Meaning… Editing this type of code should be handled using which language, etc?
 * Thanks.
 * [https://wordpress.org/plugins/contact-form-7-to-database-extension/](https://wordpress.org/plugins/contact-form-7-to-database-extension/)

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

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-7213483)
 * Use ${Submitted}
 * submit_time is the raw unix timestamp. Not specific to a language. That’s seconds
   since 1970.
 *  Thread Starter [mar2195](https://wordpress.org/support/users/mar2195/)
 * (@mar2195)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-7213494)
 * Thanks for the quick reply. But…
 * 1. How do I format the UNIX “date” data via the “html” shortcode – or do I have
   to use the “table” shortcode in order to format the DateTime to my liking?
    Do
   I need to use the info from this support doc? “Changing Form Data Before it is
   Saved” [http://cfdbplugin.com/?page_id=747](http://cfdbplugin.com/?page_id=747)…
   or ???
 * 2. As an example regarding the language…
    If I have my CF7 form input name as:
   name=”firstname” If the CFDB “html” shortcode variables coded as: ${firstname}…
   and I want to alter the data to ” strtoupper ” (as in PHP), where would I edit
   this variable/value?
 * Do I need to use the info from this support doc?
    “Changing Form Data Before 
   it is Saved” [http://cfdbplugin.com/?page_id=747](http://cfdbplugin.com/?page_id=747)…
   or ???
 * Thanks so much for your help.
 *  Thread Starter [mar2195](https://wordpress.org/support/users/mar2195/)
 * (@mar2195)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-7213501)
 * … and one follow up question …
 * If my form and the data display page require that the user be logged in before
   submitting the form, is there a variable to have the “logged in user email” displayed/
   stored?
 * Thanks.
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-7213552)
 * Date:
    I think you are making this overly complicated. As I understand it, you
   want to show the date in a specific format in [cfdb-html]. Forget about ${submit_time}.
   Use ${Submitted}. If you want to change the date format, go to the CFDB Options
   page where there is an option to change it. That changes how Submitted is displayed
   for all shortcodes and the admin page. Hopefully that works for you.
 * Login name:
    If a person is logged in when he submits a form, then his user name
   is captured in the “Submitted Login” field. Use ${Submitted Login} in the shortcode.
 * Uppercase:
    See: [http://cfdbplugin.com/?page_id=1076](http://cfdbplugin.com/?page_id=1076)
 *  Thread Starter [mar2195](https://wordpress.org/support/users/mar2195/)
 * (@mar2195)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-7213601)
 * Michael … Thanks so much for your help and explanation.
 *  [geet1](https://wordpress.org/support/users/geet1/)
 * (@geet1)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-8890352)
 * Hi,
 * I need data between two date from this “wp_cf7dbplugin_submits” table.Here is
   my query
    SELECT form_name, DATE_FORMAT(FROM_UNIXTIME(submit_time), ‘%b %e, %
   Y  %l:%i %p’) As Submitted, max(if(field_name=’name’, field_value, null )) As‘
   Name’, max(if(field_name=’email’, field_value, null )) As ‘Email’, max(if(field_name
   =’mobile’, field_value, null )) As ‘phone’, max(if(field_name=’utm_medium’, field_value,
   null )) As ‘utm_medium’ FROM wp_cf7dbplugin_submits WHERE form_name = ‘Act Now’
   and submit_time =’Mar 5, 2017 6:08 AM’
 * But because in table date are in raw format m not getting any result .Please 
   help
    -  This reply was modified 9 years, 2 months ago by [geet1](https://wordpress.org/support/users/geet1/).
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-8896706)
 * Use a shortcode
    `[cfdb-table form="Act Now" filter="submit_time>=Mar 5, 2017
   6:08 AM&&submit_time<Mar 6, 2017 6:08 AM"]`
 * [https://cfdbplugin.com/?page_id=553](https://cfdbplugin.com/?page_id=553)

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

The topic ‘Shortcode cfdb-html – Formatting Date’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

## Tags

 * [Cfdb-html](https://wordpress.org/support/topic-tag/cfdb-html/)
 * [date format](https://wordpress.org/support/topic-tag/date-format/)

 * 7 replies
 * 3 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/shortcode-cfdb-html-formatting-date/#post-8896706)
 * Status: resolved