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, 4921👍, 0💬
Popular Posts:
What is test metrics? Test metrics accomplish in analyzing the current level of maturity in testing ...
What's the output of the following program? And why? #include main() { typedef union { int a; char b...
How To Assign Query Results to Variables? - Oracle DBA FAQ - Working with Database Objects in PL/SQL...
.NET INTERVIEW QUESTIONS - Where do you specify session state mode in ASP.NET ? The following code e...
How to create a thread in a program? You have two ways to do so. First, making your class "extends" ...