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

Display Canvasjs Line Chart using Data from Database

What are the SOLID principles, and why are they important

Write Text in Notepad files Using Asp.net