Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Write Date and Time Literals
How To Write Date and Time Literals? - MySQL FAQs - Introduction to SQL Date and Time Handling
✍: FYIcenter.com
MySQL offers a number of formats for you to use to enter date and time literals:
The tutorial exercise below gives you some good examples:
SELECT DATE('1997-01-31') FROM DUAL; 1997-01-31 SELECT DATE('1997-01-31 09:26:50') FROM DUAL; 1997-01-31 SELECT TIME('1997-01-31 09:26:50') FROM DUAL; 09:26:50 SELECT DATE('1997/01/31 09^26^50') FROM DUAL; 1997-01-31 SELECT TIME('1997/01/31 09^26^50') FROM DUAL; 09:26:50 SELECT DATE('19970131') FROM DUAL; 1997-01-31 SELECT TIME('092650') FROM DUAL; 09:26:50 SELECT DATE(19970131) FROM DUAL; -- Crazy format 1997-01-31 SELECT TIME(092650) FROM DUAL; -- Crazy format 09:26:50
2007-05-11, 5127👍, 0💬
Popular Posts:
Can include files be nested? The answer is yes. Include files can be nested any number of times. As ...
If XML does not have closing tag will it work? No, every tag in XML which is opened should have a cl...
interview.FYIcenter.com offers a collections of interview questions and answers for software and Web...
How To Use SELECT Statement to Count the Number of Rows? - Oracle DBA FAQ - Understanding SQL SELECT...
How Oracle Handles Dead Locks? - Oracle DBA FAQ - Understanding SQL Transaction Management Oracle se...