- DAYOFWEEK (date): the date and returns the number of days of the week. Sunday is 1 and Saturday is 7. - Example: select DAYOFWEEK ('1998-02-03 '); - WEEKDAY (date): Returns the day of the week for the date. Monday is 0 and Sunday is 6. - Example: select WEEKDAY ('1997-10-04 22:23:00 '); - DAYOFYEAR warehouse (date): the date of the number of days from January 1 of the returns. The result is that 1-366. warehouse - Example: select DAYOFYEAR ('1998-02-03 '); - YEAR (date): Returns the year of this date. - Example: select YEAR ('98-02-03 '); - MONTH (date): Returns the month of that date. - Example: select MONTH ('1998-02-03 '); - DAYOFMONTH (date): the date of return to work. The result is that 1-31. - Example: select DAYOFMONTH ('1998-02-03 warehouse '); - HOUR (time): returns the time of that date. The result is that from 0 to 23. - Example: select HOUR ('10: 05:03 '); - MINUTE (time): Returns the minutes of that date. The result is that from 0 to 59. - Example: select warehouse MINUTE ('98-02-03 10:05:03 '); - SECOND (time): returns the number of seconds warehouse that date. The result is that from 0 to 59. - Example: select SECOND ('10: 05:03 '); - DAYNAME (date): Returns the name of the day of the date. Sunday is 'Sunday' is. - Example: select DAYNAME ("1998-02-05"); - MONTHNAME (date): Returns the name of the month of that date. February is 'February' is. - Example: select MONTHNAME ("1998-02-05"); - QUARTER (date): the date of the quarter is returned. That the result is 1-4. - WEEK (date, warehouse first): 1 different from May 1, the day of the week that can be returned. If you care to start from Sunday to zero second argument, if one puts to start from Monday. The result is that 1-52. - Example: select WEEK ('1998-02-20 ', 1); - PERIOD_ADD (P, N): P (or YYYYMM format should YYMM) plus the number of months in the amount of N is returned. Note that the second argument will be a number. - Example: select PERIOD_ADD (9801,2); - PERIOD_DIFF (P1, P2): the number of months between the two arguments is returned. YYMM two or YYYYMM format of all of the factors should be - DATE_ADD (date, INTERVAL expr type): returns the date plus a date. - DATE_SUB (date, INTERVAL expr type): warehouse returns the date minus the date. - ADDDATE (date, INTERVAL expr type): DATE_ADD (date, INTERVAL expr type) and the same. - SUBDATE (date, INTERVAL expr type): DATE_SUB (date, warehouse INTERVAL warehouse expr type) and the same. - EXTRACT (type FROM date): extracts from the date of that portion. - Example: SELECT DATE_ADD ("1997-12-31 23:59:59", INTERVAL 1 SECOND); SELECT DATE_ADD ("1997-12-31 23:59:59", INTERVAL 1 DAY); SELECT DATE_ADD ("1997-12-31 23:59:59", INTERVAL "1:1" MINUTE_SECOND); SELECT DATE_SUB ("1998-01-01 00:00:00", INTERVAL "1 1:1:1" DAY_SECOND); SELECT DATE_ADD ("1998-01-01 00:00:00", INTERVAL "-1 10" DAY_HOUR); SELECT DATE_SUB ("1998-01-02", warehouse INTERVAL 31 DAY); SELECT EXTRACT (YEAR FROM "1999-07-02"); SELECT EXTRACT (YEAR_MONTH warehouse FROM "1999-07-02 01:02:03"); SELECT EXTRACT (DAY_MINUTE FROM "1999-07-02 01:02:03"); - Note: type keyword is used SECOND, MINUTE, HOUR, DAY, MONTH, warehouse YEAR, MINUTE_SECOND, HOUR_MINUTE, DAY_HOUR, warehouse YEAR_MONTH, HOUR_SECOND, DAY_MINUTE, DAY_SECOND is. - Note: The smaller the number of days of the month if the calculation is to return warehouse to the last day of the month. For example, select DATE_ADD ('1998-01-30 ', Interval 1 month); 1998-02-28 In the case of returned. - TO_DAYS (date): warehouse 0 returns warehouse the number of days in the year since. This function does not count for the previous day in 1582. - Example: select TO_DAYS (950501); - FROM_DAYS (N): returns the date of that number. This function does not count for the previous day in 1582. - Example: select FROM_DAYS (729669); - DATE_FORMAT (date, format): the date is converted to the format of the string returned. - Example: select DATE_FORMAT ('1997-10-04 22:23:00 ','% W% M% Y '); select DATE_FORMAT warehouse ('1997-10-04 22:23:00 ','% H:% i:% s'); select DATE_FORMAT ('1997-10-04 warehouse 22:23:00 ','% D% y% a% d% m% b% j '); select DATE_FORMAT ('1997-10-04 22:23:00 ','% H% k% I% r% T% S% w '); - Note: The format is as follows: % M (month name),% warehouse W (weekday name),% Y (YYYY format year),% y (YY format year),% a (an abbreviation of the weekday name),% d (DD date format), % e (D type of date),% m (MM format date),% c (M type of date),% H (HH Type the time, in 24-hour format),% k (H type, 24 type),% h (HH format or 12 hour time format),% i (MM type of minutes),% p (AM or PM) - TIME_FORMAT (time, format): warehouse DATE_FORMAT (date, format) in the same way as can be used, but for me at least as NULL or 0 is returned. - CURDATE (): returns the current date. When the number and the number is converted into an operation. The format warehouse is 'YYYY-MM-DD' warehouse or YYYYMMDD is. - Example: select CURDATE (); select CURDATE () + 0; - CURTIME (): Returns the current time. When the number and the number is converted into an operation. The format is 'HH: MM: SS' or HHMMSS is. - Example: select CURTIME (); select warehouse CURTIME () + 0; - SYSDATE (): returns the current date time. When the number and the number is converted into an operation. The format is 'YYYY-MM-DD HH: MM: SS' warehouse or YYYYMMDDHHMMSS is. - Example: select NOW (); select NOW () + 0; - NOW (): SYSDATE warehouse () with the same. - UNIX_TIMESTAMP (): '1970-01-01 00:00:00 'returns from the beginning. If the argument is given, the date for the Unix timestamp. warehouse - Example: select UNIX_TIMESTAMP (); select UNIX_TIMESTAMP ('1997-10-04 22:23:00 '); - FROM_UNIXTIME (unix_timestamp): UNIX time format to date. - Example: select FROM_UNIXTIME warehouse (875996580); - FROM_UNIXTIME (unix_timestamp, format): UNIX time and date format DATE_FORMAT (date, format) is converted to the format described in the returns. - Example: select FROM_UNIXTIME (UNIX_TIMESTAMP (), '% Y% D% M% h:% i:% s% x'); - TIME_TO_SEC (time): the time from the beginning of the return warehouse to 0:0:0. - Example: select TIME_TO_SEC ('22: 23:00 '); - SEC_TO_TIME (seconds): Change the seconds of the time. - Example: select SEC_TO_TIME (2378);
JAVA / Android warehouse / JSP / ORACLE Let's study! Boo! ...
MySql (2)
Recent Comment казино фа
No comments:
Post a Comment