MySQL Date Time - How Many Ways to Get the Current Time
Interview Question Database For Software Developers
|
|
| How Many Ways to Get the Current Time | | How Many Ways to Get the Current Time? - MySQL FAQs - Introduction to SQL Date and Time Handling | | By: FYIcenter.com | There are 8 ways to get the current time:
SELECT NOW() FROM DUAL;
2006-07-01 10:02:41
SELECT CURRENT_TIME() FROM DUAL;
10:02:58
SELECT SYSDATE() FROM DUAL;
2006-07-01 10:03:21
mysql> SELECT CURRENT_TIMESTAMP() FROM DUAL;
2006-07-01 10:04:03
SELECT LOCALTIME() FROM DUAL;
2006-07-01 10:07:37
mysql> SELECT LOCALTIMESTAMP() FROM DUAL;
2006-07-01 10:08:08
mysql> SELECT UTC_TIME() FROM DUAL;
14:09:22
mysql> SELECT UTC_TIMESTAMP() FROM DUAL;
2006-07-01 14:09:49
| | ID: 1110 | Rank: 1190 | Votes: 0 | Views: 54 | Submitted: 20070511 |
1182 :-) | | What Is TIMESTAMP | | What Is TIMESTAMP? - MySQL FAQs - Introduction to SQL Date and Time Handling... | | Submitted: 20070511 |
|
1185 :-) | | What Are DML Statements | | What Are DML Statements? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements... | | Submitted: 20070511 |
|
1169 :-) | | How To Create a Testing Table | | How To Create a Testing Table? - MySQL FAQs - Understanding SQL INSERT, UPDATE and DELETE Statements... | | Submitted: 20070511 |
|
Copyright © 2010 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|