count_big  current_time

Chapter 2: Transact-SQL Functions

current_date

Description

Returns the current date.

Syntax

current_date()

Parameters

None.

Examples

Example 1

Identifies the current date with datename:

1>  select datename(month, current_date())
2> go
------------------------------ 
August 

Example 2

Identifies the current date with datepart:

1> select datepart(month, current_date())
2> go
----------- 
8 

(1 row affected)

Usage

Finds the current date as it exists on the server.

Standards

ANSI SQL – Compliance level: Entry-level compliant.

Permissions

Any user can execute current_date.

See also

Datatypes Date and time datatypes

Commands select, where clause

Functions dateadd, datename, datepart, getdate





Copyright © 2005. Sybase Inc. All rights reserved. current_time

View this book as PDF