A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: Date and Time Functions

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()

    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().