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 Extract a Unit Value from a Date and Time
How To Extract a Unit Value from a Date and Time? - MySQL FAQs - Introduction to SQL Date and Time Handling
✍: FYIcenter.com
If you want to extract a specific date or time unit value out of a date or a time, you can use the EXTRACT(unit FROM expression) function. The tutorial exercise below gives you some good examples:
ELECT EXTRACT(DAY FROM NOW()) FROM DUAL; 28 ELECT EXTRACT(HOUR FROM NOW()) FROM DUAL; 23 ELECT EXTRACT(SECOND FROM NOW()) FROM DUAL; 36
2007-05-11, 5169👍, 0💬
Popular Posts:
What is the purpose of the wait(), notify(), and notifyAll() methods? The wait(),notify(), and notif...
What will happen in these three cases? if (a=0) { //somecode } if (a==0) { //do something } if (a===...
How to reduce the final size of an executable file? Size of the final execuatable can be reduced usi...
What is the difference between "printf(...)" and "sprintf(...)"? sprintf(...) writes data to the cha...
What Is Posting? Posting is an event that writes Inserts, Updates and Deletes in the forms to the da...