How SQL SERVER 2000 obtains the current system time with SQL statements
is to use GETDATE ();
getdate in SQL ()
A very powerful date format function in SQL Server
Select CONVERT (varchar), GETDATE (), 0): 2008 10:57am Select CONVERT (varchar), GETDATE (), 1): 05/16/08 Selec T CONVERT (varchar), GETDATE (), 2): 08.05.16 select CONVERT (varchar), GETDATE (), 3): 16/05/08 Select CONVERT (varch AR (M), GETDATE (), 4): 16.05.08 select CONVERT (varchar), GETDATE (), 5): 16-05-08 select CONVERT (varchar), Getdat E (), 6): Select CONVERT (varchar), GETDATE (), 7): Select CONVERT (varchar), GETDATE (), 8): 10:57: Select CONVERT (varchar), GETDATE (), 9): 2008 10:57:46:827AM Select CONVERT (varchar), GETDATE (), 10): 05-1 6-08 select CONVERT (varchar), GETDATE (), one): 08/05/16 select CONVERT (varchar), GETDATE (), (): 080516 Select CONV ERT (varchar), GETDATE (): 2008 10:57:46:937 Select CONVERT (varchar), GETDATE (): 10:57:46:967 Select CONVERT (varchar), GETDATE (): 2008-05-16 10:57:47 Select CONVERT (varchar), GETDATE (), 21): 2008-05-16 10:57: 47.157 Select CONVERT (varchAR (M), GETDATE (): 05/16/08 10:57:47 AM Select CONVERT (varchar), GETDATE () (): 2008-05-16 select CONVERT (varch AR (M), GETDATE (): 10:57:47 select CONVERT (varchar), GETDATE (): 2008-05-16 10:57:47.250 Select CONVERT (var char (M), GETDATE (): 2008 10:57AM Select CONVERT (varchar), GETDATE (), (): 05/16/2008 select CONVERT (var char (M), GETDATE (), 102): 2008.05.16 Select CONVERT (varchar (), GETDATE (), $): 16/05/2008 select CONVERT (varchar ( GETDATE (), (): 16.05.2008 select CONVERT (varchar), GETDATE (), (): 16-05-2008 select CONVERT (varchar), G Etdate (), ()): 2008 Select CONVERT (varchar (), GETDATE (), m): 2008 Select CONVERT (varchar), GETDATE ( 108): 10:57:49 select CONVERT (varchar), GETDATE (), 109): 2008 10:57:49:437AM Select CONVERT (varchar), get DATE (): 05-16-2008 select CONVERT (varchar), GETDATE (), (): 2008/05/16 select CONVERT (varchar), GETDATE () , 112): 20080516 Select CONVERT(varchar (MB), GETDATE (), 113): 2008 10:57:49:513 Select CONVERT (varchar), GETDATE (), 114): 10:57:49:547 Select CONVERT (varchar), GETDATE () (): 2008-05-16 10:57:49 Select CONVERT (varchar), GETDATE (), 121): 2008-05-16 10:57:49.700 select CONVERT (varchar), GETDATE (), 126): 2008-05-16t10:57:49.827 select CONVERT (varchar (100), GETDATE (), 130):???? ??????
1427 10:57:49:907am Select CONVERT (varchar (MB), GETDATE (), 131): 18/04/1427 10:57:49:920am
Get SQL Server server time
INSERT INTO TableName (Date) value getDate ()
"Select GETDATE () as Serverdate"
The Serverdate property is then read as SQL Server server time.
You can also use the following statement directly to obtain:
Select GETDATE ()
Select Current_timestamp
Get the time format as follows:
2016-07-07 14:07:15.670