oracle ʱ¼äº¯Êý
ÔÚoracleÖд¦ÀíÈÕÆÚ´óÈ«
TO_DATE¸ñʽ
Day:
dd number 12
dy abbreviated fri
day spelled out friday
ddspth spelled out, ordinal twelfth
Month:
mm number 03
mon abbreviated mar
month spelled out march
Year:
yy two digits 98
yyyy four digits 1998
24Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 0:00:00 - 23:59:59....
12Сʱ¸ñʽÏÂʱ¼ä·¶Î§Îª£º 1:00:00 - 12:59:59 ....
1.
ÈÕÆÚºÍ×Ö·ûת»»º¯ÊýÓ÷¨£¨to_date,to_char£©
2.
select to_char( to_date(222,'J'),'Jsp') from dual
ÏÔʾTwo Hundred Twenty-Two
3.
ÇóijÌìÊÇÐÇÆÚ¼¸
select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day') from dual;
ÐÇÆÚÒ»
select to_char(to_date('2002-08-26','yyyy-mm-dd'),'day','NLS_DATE_LANGUAGE = American') from dual;
monday
ÉèÖÃÈÕÆÚÓïÑÔ
ALTER SESSION SET NLS_DATE_LANGUAGE='AMERICAN';
Ò²¿ÉÒÔÕâÑù
TO_DATE ('2002-08-26', 'YYYY-mm-dd', 'NLS_DATE_LANGUAGE = American')
4.
Á½¸öÈÕÆÚ¼äµÄÌìÊý
select floor(sysdate - to_date('20020405','yyyymmdd')) from dual;
5. ʱ¼äΪnullµÄÓ÷¨
select id, active_date from table1
UNION
select 1, TO_DATE(null) from dual;
×¢ÒâÒªÓÃTO_DATE(null)
6.
a_date between to_date('20011201','yyyymmdd') and to_date('20011231','yyyymmdd')
ÄÇô12ÔÂ31ºÅÖÐÎç12µãÖ®ºóºÍ12ÔÂ1ºÅµÄ12µã֮ǰÊDz»°üº¬ÔÚÕâ¸ö·¶Î§Ö®Äڵġ£
ËùÒÔ£¬µ±Ê±¼äÐèÒª¾«È·µÄʱºò£¬¾õµÃto_char»¹ÊDZØÒªµÄ
7. ÈÕÆÚ¸ñʽ³åÍ»ÎÊÌâ
ÊäÈëµÄ¸ñʽҪ¿´Äã°²×°µÄORACLE×Ö·û¼¯µÄÀàÐÍ, ±ÈÈç: US7ASCII, date¸ñʽµÄÀàÐ;ÍÊÇ: '01-Jan-01'
alter system set NLS_DATE_LANGUAGE = American
alter session set NLS_DATE_LANGUAGE
Ïà¹ØÎĵµ£º
OracleÊý¾Ý¿âµÄ±¸·Ý·ÖΪһÖÂÐԺͷÇÒ»ÖÂÐÔÁ½ÖÖ¡£
Ò»ÖÂÐÔ±¸·Ý£¬¾ÍÊÇÊý¾Ý¿âÔڹرյÄ״̬Ï»òÕßmount״̬ϽøÐеı¸·Ý¡£ÕâʱºòÓÉÓÚÊý¾Ý¿âûÓдò¿ª£¬Ã»ÓÐÊý¾Ý´¦Àí·¢Éú£¬¿ØÖÆÎļþ¡¢Êý¾ÝÎļþºÍÈÕÖ¾ÎļþÖеÄscn±£³ÖÒ»Ö¡£ËùÒÔ³ÉΪһÖÂÐÔ±¸·Ý¡£
²»Ò»ÖÂÐÔ±¸·Ý£¬¾ÍÊÇÊý¾Ý¿âÔÚopen״̬ϽøÐеı¸·Ý£¬ÕâʱºòÓÉÓÚÊý¾ÝÎļþºÍ¿ØÖÆÎļþÒÔ¼° ......
WIN7µÄϵͳ½çÃæºÜƯÁÁ£¬Ê¹ÓÃÆðÀ´È·ÊµºÜ²»´í£¬¿ÉÊÇÈ´Ò²¸øÎÒµÄѧϰ´øÀ´¹ý²»ÉÙÂé·³¡£ÓÈÆäÊÇÕâ´Î×°Oracle£¬±ðÈËÓõÄÊÇXPµÄϵͳºÜÈÝÒ×¾Í×°ÉÏÁ˵ģ¬¿ÉÊÇÎÒÈ´ÔõôҲװ²»ÉÏ¡£ÎªÁËÈÃͬÑùϲ°®WIN7µÄÅóÓÑÉÙ×ßЩÍä·£¬ÏÂÃæ¾Í½éÉÜÒ»ÏÂÔÚwin7Éϰ²×°Oracle10gµÄ·½·¨°É£¬ÄÇ¿ÉÊDZ¾ÈËÓÃÁË8Ììʱ¼ä£¬²»Í ......
ÔÙWindows XPÉÏдºÃµÄASP.NETÓ¦ÓóÌÐò²¿Êðµ½IISÉÏ,Á¬½Ó²»ÉÏOracle10gÊý¾Ý¿â,Ìáʾ£º
System.Data.OracleClient Requires oracle client software version 8.1.7 or greater¡£
ÒòΪÔÚµ÷ÊÔ»·¾³ÊÇ¿ÉÒÔÁ¬½ÓÉϵÄ,ËùÒÔ¿¼ÂÇ¿ÉÄÜÊÇIISȨÏÞÉèÖÃÎÊÌâ¡£
ÊÔ׎«ASP.NETÓû§Ìí¼Óµ½ÁËAdministrator×éÖС£½á¹ûÁ¬½Ó³É¹¦¡£ ......
OracleÈ«ÎÄË÷ÒýµÄ»ù±¾ÖªÊ¶
Ò»¡¢ÀúÊ·±³¾°
OracleÊý¾Ý¿âµÄÈ«ÎļìË÷¼¼ÊõÒѾ·Ç³£ÍêÃÀ£¬Oracle TextʹOracle9i¾ß±¸ÁËÇ¿´óµÄÎı¾¼ìË÷ÄÜÁ¦ºÍÖÇÄÜ»¯µÄÎı¾¹ÜÀíÄÜÁ¦¡£Oracle TextÊÇOracle9i²ÉÓõÄÐÂÃû³Æ£¬ÔÚOracle8/8iÖÐËü±»³Æ×÷Oracle interMedia Text£¬ÔÚOracle8ÒÔǰËüµÄÃû³ÆÊÇOracle ConText Cartridge¡£
¶þ¡¢Oracle Text Ë÷Ò ......