-- Samo formate za Datum
SELECT CONVERT(VARCHAR, getdate(), 1) -- 12/30/06
SELECT CONVERT(VARCHAR, getdate(), 2) -- 06.12.30
SELECT CONVERT(VARCHAR, getdate(), 3) -- 30/12/06
SELECT CONVERT(VARCHAR, getdate(), 4) -- 30.12.06
SELECT CONVERT(VARCHAR, getdate(), 5) -- 30-12-06
SELECT CONVERT(VARCHAR, getdate(), 6) -- 30 Dec 06
SELECT CONVERT(VARCHAR, getdate(), 7) -- Dec 30, 06
SELECT CONVERT(VARCHAR, getdate(), 10) -- 12-30-06
SELECT CONVERT(VARCHAR, getdate(), 11) -- 06/12/30
SELECT CONVERT(VARCHAR, getdate(), 12) -- 061230
SELECT CONVERT(VARCHAR, getdate(), 23) -- 2006-12-30
SELECT CONVERT(VARCHAR, getdate(), 101) -- 12/30/2006
SELECT CONVERT(VARCHAR, getdate(), 102) -- 2006.12.30
SELECT CONVERT(VARCHAR, getdate(), 103) -- 30/12/2006
SELECT CONVERT(VARCHAR, getdate(), 104) -- 30.12.2006
SELECT CONVERT(VARCHAR, getdate(), 105) -- 30-12-2006
SELECT CONVERT(VARCHAR, getdate(), 106) -- 30 Dec 2006
SELECT CONVERT(VARCHAR, getdate(), 107) -- Dec 30, 2006
SELECT CONVERT(VARCHAR, getdate(), 110) -- 12-30-2006
SELECT CONVERT(VARCHAR, getdate(), 111) -- 2006/12/30
SELECT CONVERT(VARCHAR, getdate(), 112) -- 20061230
-- Samo formate za Vreme
SELECT CONVERT(VARCHAR, getdate(), 8) -- 00:38:54
SELECT CONVERT(VARCHAR, getdate(), 14) -- 00:38:54:840
SELECT CONVERT(VARCHAR, getdate(), 24) -- 00:38:54
SELECT CONVERT(VARCHAR, getdate(), 108) -- 00:38:54
SELECT CONVERT(VARCHAR, getdate(), 114) -- 00:38:54:840
--Datum i Vreme
SELECT CONVERT(VARCHAR, getdate(), 0) -- Dec 12 2006 12:38AM
SELECT CONVERT(VARCHAR, getdate(), 9) -- Dec 30 2006 12:38:54:840AM
SELECT CONVERT(VARCHAR, getdate(), 13) -- 30 Dec 2006 00:38:54:840AM
SELECT CONVERT(VARCHAR, getdate(), 20) -- 2006-12-30 00:38:54
SELECT CONVERT(VARCHAR, getdate(), 21) -- 2006-12-30 00:38:54.840
SELECT CONVERT(VARCHAR, getdate(), 22) -- 12/30/06 12:38:54 AM
SELECT CONVERT(VARCHAR, getdate(), 25) -- 2006-12-30 00:38:54.840
SELECT CONVERT(VARCHAR, getdate(), 100) -- Dec 30 2006 12:38AM
SELECT CONVERT(VARCHAR, getdate(), 109) -- Dec 30 2006 12:38:54:840AM
SELECT CONVERT(VARCHAR, getdate(), 113) -- 30 Dec 2006 00:38:54:840
SELECT CONVERT(VARCHAR, getdate(), 120) -- 2006-12-30 00:38:54
SELECT CONVERT(VARCHAR, getdate(), 121) -- 2006-12-30 00:38:54.840
SELECT CONVERT(VARCHAR, getdate(), 126) -- 2006-12-30T00:38:54.840
SELECT CONVERT(VARCHAR, getdate(), 127) -- 2006-12-30T00:38:54.840
--Islamski Kalendar
SELECT CONVERT(nvarchar, getdate(), 130) -- date output
SELECT CONVERT(nvarchar, getdate(), 131) -- 10/12/1427 12:38:54:840AM
--ZAMENA NA KARAKTERA ( /,) SA PRAZEN STRING Vraca samo broj
SELECT REPLACE(CONVERT(VARCHAR, getdate(),101),'/','') -- 12302006
SELECT REPLACE(CONVERT(VARCHAR, getdate(),101),'/','') + REPLACE(CONVERT(VARCHAR, getdate(),108),':','') -- 12302006004426