Different Time Format In SQL Server


1.Get HH:mm:ss Time Format:

    select convert(varchar(10),GETDATE(),108) as Time 
    
     Result:
          Time
          22:45:44

2.Get HH:mm:ss:mmm Time Format:

    select convert(varchar(20),GETDATE(),114) as Time 
    
     Result:
          Time
          22:45:44:887

Comments

Popular posts from this blog

Insecure cookie setting: missing Secure flag

Maximum Stored Procedure Function Trigger or View Nesting Level Exceeded (limit 32) in SQL Server

Display Line Chart Using Chart.js MVC C#