|
getdate()
The
Date & Time Function
getdate()
returns the current date and time of the operating system on which
ASE®
is running.
Syntax of the Datatype Conversion Function getdate()
Example for the Datatype Conversion Function getdate()
select getdate()
go
-----
Returns the current date and time of the operating system clock.
select datepart(yy, getdate())
go
-----
Returns the four digit number of the year for the current date.
select datename(month, getdate())
go
-----
Returns the written out name of the month for the current date (The function
month
is available in ASE® starting with version 15.0)
See also:
ASE T-SQL - Aggregate Functions, Date and Time Functions, dateadd(), datediff(), datename(), datepart(), date_part, day(), month(), style numbers, year().
|