Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Technical Reference
 GETDATE (SSIS Expressions)

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
Other versions are also available for the following:
SQL Server 2008 Books Online (June 2009)
GETDATE (SSIS Expressions)

Returns the current date of the system in a DT_DBTIMESTAMP format. The GETDATE function takes no arguments.

ms139875.note(en-us,SQL.100).gifNote:
The length of the return result from the GETDATE function is 29 characters.

GETDATE()

None

DT_DBTIMESTAMP

This example returns the year of the current date.

DATEPART("year",GETDATE())

This example returns the number of days between a date in the ModifiedDate column and the current date.

DATEDIFF("dd",ModifiedDate,GETDATE())

This example adds three months to the current date.

DATEADD("Month",3,GETDATE())
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker