Title: Date format?
Last modified: December 9, 2020

---

# Date format?

 *  [professionalformulas](https://wordpress.org/support/users/professionalformulas/)
 * (@professionalformulas)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/date-format-202/)
 * Simple question: I’ve enabled the user registration date, which is called visitorRegistrationDate
   in the data layer.
 * The value of visitorRegistrationDate is a string that looks like 1512130332 or
   1526601600 (for example).
 * This value doesn’t look like a normal date/time format. What is the best way 
   to view or convert this value to a recognizable date?
 * Thanks!

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

 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/date-format-202/#post-13817743)
 * Hi,
 * This is a Unix timestamp that has wider opportunities of application.
    In order
   to convert this into a more readable text, you can create a data layer variable
   to read the content, let’s say you name this GTM variable as {{Visitor Registration
   Date}}
 * Now you need to create a custom JS variable with this code:
 * function() {
    return new Date( {{Visitor Registration Date}} * 1000 ); }
 *  [karnager](https://wordpress.org/support/users/karnager/)
 * (@karnager)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/date-format-202/#post-14238504)
 *     ```
       function() {
       return new Date( {{Visitor Registration Date}} * 1000 );
       }
       ```
   
 * Not working function. object javascript variable empty
    -  This reply was modified 5 years, 2 months ago by [karnager](https://wordpress.org/support/users/karnager/).
 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/date-format-202/#post-14239569)
 * Hi [@karnager](https://wordpress.org/support/users/karnager/),
 * Please post a website URL so that I can check it as well.

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

The topic ‘Date format?’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/date-format-202/#post-14239569)
 * Status: not resolved