简体   繁体   中英

MySQL change default session date

In need to change the default date in MySQL to a future date.

So if today's date is 2012-07-30 (YYYY-MM-DD) I want to be able to set my MySQL session date to a future date, for example 2012-08-05.

So, when I do

select curdate()

curdate(): 2012-07-30

Change the MySQL session date to 2012-08-05

select curdate()

curdate(): 2012-08-05

尝试这个:

SET TIMESTAMP=unix_timestamp('2012-08-05');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM