- ©«¤l
- 13
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2011-11-23
- ³Ì«áµn¿ý
- 2012-2-9
|
[¤À¨É] oracle ¤é´Á±`¥Î¨ç¼Æ (SYSDATE¡B¤é´Á®æ¦¡)
--¡· ¥i±o¨ì¥Ø«e¨t²Îªº®É¶¡
select sysdate from dual;
--¡· ±`¥Î¤§¤é´Á®æ¦¡
¤é´Á®æ¦¡ »¡©ú
------------------------------------------------------------------------
YYYY/MM/DD -- ¦~/¤ë/¤é
YYYY -- ¦~(4¦ì)
YYY -- ¦~(3¦ì)
YY -- ¦~(2¦ì)
MM -- ¤ë¥÷
DD -- ¤é´Á
D -- ¬P´Á (¬P´Á¤é = 1 ¬P´Á¤@ = 2 ¬P´Á¤G = 3 ¬P´Á¤T = 4 ¬P´Á¥| = 5 ¬P´Á¤ = 6 ¬P´Á¤» = 7 )
DDD -- ¤@¦~¤§²Ä´X¤Ñ
WW -- ¤@¦~¤§²Ä´X¶g
W -- ¤@¤ë¤§²Ä´X¶g
YYYY/MM/DD HH24:MI:SS -- ¦~/¤ë/¤é ®É(24¤p®É¨î):¤À:¬í
YYYY/MM/DD HH:MI:SS -- ¦~/¤ë/¤é ®É(«D24¤p®É¨î):¤À:¬í
select to_char(sysdate,'YYYY/MM/DD') FROM DUAL; --2011/11/29
select to_char(sysdate,'YYYY') FROM DUAL; --2011
select to_char(sysdate,'YYY') FROM DUAL; --011
select to_char(sysdate,'YY') FROM DUAL; --11
select to_char(sysdate,'MM') FROM DUAL; --11
select to_char(sysdate,'DD') FROM DUAL; --29
select to_char(sysdate,'D') FROM DUAL; --3
select to_char(sysdate,'DDD') FROM DUAL; --333
select to_char(sysdate,'WW') FROM DUAL; --48
select to_char(sysdate,'W') FROM DUAL; --5
select to_char(sysdate,'YYYY/MM/DD HH24:MI:SS') FROM DUAL; --2011/11/29 09:47:18
select to_char(sysdate,'YYYY/MM/DD HH:MI:SS') FROM DUAL; --2011/11/29 09:47:32 |
|