Title: Default Value &#8211; Current_timestamp
Last modified: March 3, 2021

---

# Default Value – Current_timestamp

 *  [carlrgates](https://wordpress.org/support/users/carlrgates/)
 * (@carlrgates)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/default-value-current_timestamp/)
 * When I go to add add a new record, the timestamp defined field that is defaulted
   with “current_timestamp” shows the Literal “Current_timestamp”. If the field 
   is not modified (not entered) and the record is submitted to be added, I get 
   the date “-001-11-30 00:00” not the current value of Current_timestamp. When 
   I select the field but don’t enter any value and then submit the add, I get the
   correct timestamp.
 * Taking this one step farther: how do you update this field with the date that
   the record was last updated (I remember a parameter “on update” from my old Oracle
   days, do you have this option?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/default-value-current_timestamp/#post-14136337)
 * Hi [@carlrgates](https://wordpress.org/support/users/carlrgates/),
 * You cannot use current_timestamp as a default value in the Data Designer or a
   Project Template. It can only be used in SQL like:
 * ALTER TABLE t
    MODIFY COLUMN c TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE 
   CURRENT_TIMESTAMP;
 * From my old Oracle days as well! 🙂
 * You can execute this command directly from the Data Explorer button Import data/
   Execute script(s). Just make sure your SQl statement end with a ; directly followed
   by a new line. You can also enter multiple SQL statement in one script.
 * Does this help?
    Peter

Viewing 1 replies (of 1 total)

The topic ‘Default Value – Current_timestamp’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/default-value-current_timestamp/#post-14136337)
 * Status: not resolved