Search the Community
Showing results for tags 'timestamp'.
-
I have a issue about UTC_TIME() and CURTIME(). When I typed this command in windows DOS prompt of mysql client "SELECT CONVERT_TZ(UTC_TIMESTAMP(), 'UTC', 'Asia/Taipei');" , the client show that the time have converted to the Taipei time. But when i entered this following command { page 192, step 5 add new records to the messages table: SELECT INTO messages (parent_id, forum_id, user_id, subject, body, date_entered) VALUES (0, 1, 1, 'Question about normaliztion.' ......}. I see the time of the column - 'date_entered' is not Taipei time in phpMyAdmin. So I typed the following commands: SELECT CURTIME(); SELECT UTCTIMESTAMP(); and they show the two different times. Help This is the snapshot picture.
-
Hi. I'm modifying the 'quotes' script in chapter 13 to include a statement before the quotes that indicates a 'new' or 'recent' quote if the quote was entered within the last 30 days. I know I need to use $row[date_entered] (type timestamp in mysql, e.g. 2014-03-09 13:25:11). Is there a function to compare that timestamp with today (in number of days)? Thanks.
-
Hi, I'm new to Yii and did Larry's series "Learning the Yii Framework" and I'm having an issue with CURRENT_TIMESTAMP and probably DATETIME not displaying in the 'protected.../...employee/create' view "_form.php" when doing the INSERTs. If I do the INSERTs to the "employee" table using phpMyAdmin, the CURRENT_TIMESTAMP variable displays, and MySQL works from the console: mysql> select current_timestamp(); +---------------------+ | current_timestamp() | +---------------------+ | 2013-07-30 23:46:30 | +---------------------+ 1 row in set (0.00 sec) Is this a "Windows" thing? Windows XP Apache 2.4.4 MySQL 5.6.12 PHP 5.4.16 WampServer 2.4
- 24 replies
-
- timestamp
- current_timestamp
-
(and 1 more)
Tagged with: