sql datum formatieren

Solutions on MaxInterview for sql datum formatieren by the best coders in the world

showing results for - "sql datum formatieren"
Emma
26 Jan 2019
1SELECT convert(varchar, getdate(), 100) -- mon dd yyyy hh:mmAM
2
3SELECT convert(varchar, getdate(), 101) -- mm/dd/yyyy – 10/02/2008                  
4
5SELECT convert(varchar, getdate(), 102) -- yyyy.mm.dd – 2008.10.02           
6
7SELECT convert(varchar, getdate(), 103) -- dd/mm/yyyy
8
9SELECT convert(varchar, getdate(), 104) -- dd.mm.yyyy
10
11SELECT convert(varchar, getdate(), 105) -- dd-mm-yyyy
12
13SELECT convert(varchar, getdate(), 106) -- dd mon yyyy
14
15SELECT convert(varchar, getdate(), 107) -- mon dd, yyyy
16
17SELECT convert(varchar, getdate(), 108) -- hh:mm:ss
18
19SELECT convert(varchar, getdate(), 109) -- mon dd yyyy hh:mm:ss:mmmAM (or PM)
20
21SELECT convert(varchar, getdate(), 110) -- mm-dd-yyyy
22
23SELECT convert(varchar, getdate(), 111) -- yyyy/mm/dd
24
25SELECT convert(varchar, getdate(), 112) -- yyyymmdd
26
27SELECT convert(varchar, getdate(), 113) -- dd mon yyyy hh:mm:ss:mmm
28
29SELECT convert(varchar, getdate(), 114) -- hh:mm:ss:mmm(24h)
30
31SELECT convert(varchar, getdate(), 120) -- yyyy-mm-dd hh:mm:ss(24h)
32
33SELECT convert(varchar, getdate(), 121) -- yyyy-mm-dd hh:mm:ss.mmm
34
35SELECT convert(varchar, getdate(), 126) -- yyyy-mm-ddThh:mm:ss.mmm
36