Title: timestamp varchar(20)
Last modified: August 30, 2016

---

# timestamp varchar(20)

 *  [jiggsup](https://wordpress.org/support/users/jiggsup/)
 * (@jiggsup)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/timestamp-varchar20/)
 * How does one convert the value in the timestamp column to, at least, month/day/
   year?
 * [https://wordpress.org/plugins/wassup/](https://wordpress.org/plugins/wassup/)

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

 *  Thread Starter [jiggsup](https://wordpress.org/support/users/jiggsup/)
 * (@jiggsup)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/timestamp-varchar20/#post-6215934)
 * Sorry, that was a pretty broad request. Perhaps you could solve this by referencing
   a standard like MySQL timestamp, UNIX, PHP etc.
 * The first thing I did with your downloaded records was a minor tweak and Inserted
   them into my SQL Server. If I need other engines to achieve my m/d/y goal I’m
   willing, just need a little direction.
    Thanks.
 *  Plugin Contributor [helened](https://wordpress.org/support/users/helened/)
 * (@helened)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/timestamp-varchar20/#post-6216000)
 * Converting unix timestamp to SQL datetime format is straightforward. You only
   need to add the timestamp value (as seconds) to the epoch date ‘1970-01-01 00:
   00:00’. You can do this with the “DATE_ADD” command in MySQL or “DATEADD” in 
   SQL server:
 * > In SQL server:
   >  `SELECT DATEADD(SECOND, timestamp, '1970-01-01 00:00:00') AS
   > visit_datetime;`
 * > Mysql requires that timestamp be converted to integer:
   >  `SELECT DATE_ADD('1970-
   > 01-01 00:00:00', INTERVAL CAST(timestamp AS UNSIGNED) SECOND) AS visit_datetime`
 * Note that you probably need backticks around timestamp (not shown here)

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

The topic ‘timestamp varchar(20)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wassup_f2eef0.svg)
 * [WassUp Real Time Analytics](https://wordpress.org/plugins/wassup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wassup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wassup/)
 * [Active Topics](https://wordpress.org/support/plugin/wassup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wassup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wassup/reviews/)

## Tags

 * [convert](https://wordpress.org/support/topic-tag/convert/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [timestamp](https://wordpress.org/support/topic-tag/timestamp/)

 * 2 replies
 * 2 participants
 * Last reply from: [helened](https://wordpress.org/support/users/helened/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/timestamp-varchar20/#post-6216000)
 * Status: not resolved