2016년 1월 20일 수요일

MS SQL 날자 함수

1. GETDATE() 시스템날짜 리턴
SELECT GETDATE()
2011-05-24 오전 11:22:33
SELECT GETDATE()+100
2011-09-01 오전 11:22:33

2. CONVERT() 결과값의 데이터 타입 변환
SELECT CONVERT(varchar(30), GETDATE(), 100)
May 24 2011 10:51 AM
SELECT CONVERT(varchar(30), GETDATE(), 101)
05/24/2011
SELECT CONVERT(varchar(30), GETDATE(), 102)
2011.05.24
SELECT CONVERT(varchar(30), GETDATE(), 103)
24/05/2011
SELECT CONVERT(varchar(30), GETDATE(), 104)
24.05.2011
SELECT CONVERT(varchar(30), GETDATE(), 105)
24-05-2011
SELECT CONVERT(varchar(30), GETDATE(), 106)
24 May 2011
SELECT CONVERT(varchar(30), GETDATE(), 107)
May 24 2011
SELECT CONVERT(varchar(30), GETDATE(), 108)
11:22:33
SELECT CONVERT(varchar(30), GETDATE(), 109)
May 24 2011 11:22:33:140AM
SELECT CONVERT(varchar(30), GETDATE(), 110)
05-24-2011
SELECT CONVERT(varchar(30), GETDATE(), 111)
2011/05/24
SELECT CONVERT(varchar(30), GETDATE(), 112)
20110524
SELECT CONVERT(varchar(30), GETDATE(), 113)
24 May 2011 11:22:33140
SELECT CONVERT(varchar(30), GETDATE(), 114)
11:22:33:140

3. DATEPART() 날짜에서 지정한 날짜형식부분만 추출
형식: DATEPART(날짜형식,날짜)
년/월/일/시/분/초/요일
DATEPART(yy,GETDATE())
2011
DATEPART(mm,GETDATE())
5
DATEPART(dd,GETDATE())
24
DATEPART(hour,GETDATE())
11
DATEPART(mi,GETDATE())
22
DATEPART(ss,GETDATE())
33
DATEPART(dw,GETDATE())
6

4. YEAR(), MONTH(), DATE() 년월일을 추출
SELECT YEAR(GETDATE())
2011
SELECT MONTH(GETDATE())
5

5. DATEADD() 날짜에 지정한만큼 더한다
형식: DATEADD(날짜형식,더할값,날짜)
SELECT DATEADD(mm,20,GETDATE())
2004-01-24 오전 11:22:33 현재날짜의 20달 후의 날짜를 출력
SELECT DATEADD(dd,100,GETDATE()) 현재날짜의 100일 후의 날짜를 출력
2011-09-01 오전 11:22:33

6. Datediff()  - 지정한 두 날짜의 간의 겹치는 날짜 및 시간 범위 반환
예)SELECT DateDiff(d,getdate(),(getdate()+31))

7. Getutcdate() -현재 UTC 시간을 나타내는 datetime 값을 반환
예) SELECT Getutcdate()

Without century (yy)

With century (yyyy)
Standard
Input/Output**
-
0 or 100 (*)
Default
mon dd yyyy hh:mi AM (or PM)
1
101
United States
mm/dd/yyyy
2
102
ANSI
yy.mm.dd
3
103
British/French
dd/mm/yy
4
104
German
dd.mm.yy
5
105
Italian
dd-mm-yy
6
106
-
dd mon yy
7
107
-
Mon dd, yy
8
108
-
hh:mm:ss
-
9 or 109 (*)
Default + milliseconds
mon dd yyyy hh:mi:ss:mmm AM (or PM)
10
110
United States
mm-dd-yy
11
111
JAPAN
yy/mm/dd
12
112
ISO
Yymmdd
-
13 or 113 (*)
Europe default + milliseconds
dd mon yyyy hh:mm:ss:mmm (24h)
14
114
-
hh:mi:ss:mmm (24h)
-
20 or 120 (*)
ODBC canonical
yyyy-mm-dd hh:mi:ss (24h)
-
21 or 121 (*)
ODBC canonical (with milliseconds)
yyyy-mm-dd hh:mi:ss.mmm (24h)
-
126(***)
ISO8601
yyyy-mm-ddThh:mm:ss.mmm (no spaces)
-
130*
Hijri****
dd mon yyyy hh:mi:ss:mmm AM
-
131*
Hijri****
dd/mm/yy hh:mi:ss:mmm AM

2016년 1월 7일 목요일

ABAP 편집기 단축기 모음

[출처 : http://help.sap.com/
 

Default Key Combinations 

Use

In the table below you can find the default key combination for the Front-End Editor.
Note 
These keyboard shortcuts are valid only for English keyboard layout.

Features

Keyboard Shortcuts
Command
Key Combination
Editing
Undo
CTRL + Z
Redo
CTRL + Y
Cut
CTRL + X
Copy
CTRL + C
Paste
CTRL + V
Delete
NUM Del
Select All
CTRL + A
Copy Line
CTRL + SHIFT + T
Cut Line
CTRL + SHIFT + X
Delete Line
CTRL + SHIFT + L
Transpose Line
CTRL + SHIFT + T
Duplicate Line
CTRL + D
Move Line Up
CTRL + ALT + NUM 8
Move Line Down
CTRL + ALT + NUM 2
Find and Replace
Find
CTRL + F
Find Incremental
CTRL + I
Replace
CTRL + H
Find Next
CTRL + G
Find Previous
CTRL + SHIFT + G
Find Incremental Previous
CTRL + SHIFT + I
Formatting
Comment Lines
CTRL + \
Uncomment Lines
CTRL + SHIFT + \
Increase Line Indent
TAB
Decrease Line Indent
SHIFT + TAB
Lower Case
CTRL + L
Upper Case
CTRL + U
Heading Style
CTRL + J
Sentence style
CTRL + T
Invert Case
CTRL + K
Navigation
Go To Line
CTRL + O
Outlining
Toggle Outlining
CTRL + NUM*
Collapse All
CTRL + SHIFT + NUM -
Open All
CTRL + SHIFT + NUM +
Bookmarks
Bookmark0
CTRL + ALT- 0
Bookmark1
CTRL + ALT- 1
Bookmark2
CTRL + ALT- 2
Bookmark3
CTRL + ALT- 3
Bookmark4
CTRL + ALT- 4
Bookmark5
CTRL + ALT- 5
Bookmark6
CTRL + ALT- 6
Bookmark7
CTRL + ALT- 7
Bookmark8
CTRL + ALT- 8
Bookmark9
CTRL + ALT- 9
Toggle Bookmark
CTRL + ALT + M
Next Bookmark
CTRL + M
Previous Bookmark
CTRL + SHIFT + M
Code Completion
Code Completion
Tab
Code Hints
SHIFT + Enter
See also: