Getting All Date Format in Sql Server
DECLARE @Count INT
SELECT @Count=0
WHILE @Count<=500
BEGIN
BEGIN TRY
IF CONVERT(NVARCHAR(50),GETDATE(),@Count)<>'0'
BEGIN
PRINT CONVERT(NVARCHAR(10),@Count) + ' - ' + CONVERT(NVARCHAR(50),GETDATE(),@Count)
END
END TRY
BEGIN CATCH
END CATCH
SELECT @Count = @Count+1
END
DECLARE @Count INT
SELECT @Count=0
WHILE @Count<=500
BEGIN
BEGIN TRY
IF CONVERT(NVARCHAR(50),GETDATE(),@Count)<>'0'
BEGIN
PRINT CONVERT(NVARCHAR(10),@Count) + ' - ' + CONVERT(NVARCHAR(50),GETDATE(),@Count)
END
END TRY
BEGIN CATCH
END CATCH
SELECT @Count = @Count+1
END