how to use getdate to get current day
The GETDATE function produces the current date and time in SQL Server 2005 internal format for datetime values. GETDATE takes the null parameter ( ). Here is the result set. You can use GETDATE in designing a report to have the current date and time printed every time the report is produced. GETDATE is also useful for functions such as logging the time a transaction occurred on an account. You can use GETDATE anywhere to return the current system date. For example, you can use GETDATE as a default value for data entry, with a local variable, or comparing an order date to the current date.