Aspects


vs


Home Page
About Us

Datepart

DATEPART is a T-SQL function that converts a DATE type to INT according to provided format.

Getdate

Getdate is a T-SQL function available to retrieve the current system date and time.



Others

Example

I prefer using these short forms because to me year getdate is shorter to type and better to read than datepart yyyy getdate

from question  

SQL Current month/ year question

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0