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, 4853👍, 0💬
Popular Posts:
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
interview.FYIcenter.com offers a collections of interview questions and answers for software and Web...
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a chang...
How do you estimate maintenance project and change requests?
When does the compiler not implicitly generate the address of the first element of an array? Wheneve...