Buradasın
SQL Server DATEADD Function Guide
sqlserverguides.com/dateadd-function-in-sql-server/Yapay zekadan makale özeti
- Function Overview
- DATEADD adds date and time units to specified dates
- Function returns new datetime value after manipulation
- Useful for computing employee ages and scheduling events
- Syntax Components
- DATEADD() function adds datetime interval to given date
- Datepart specifies specific date part to increase
- Number defines increment amount (positive or negative)
- Usage Examples
- Can add months, years, hours, minutes to dates
- Works with datetime values like '2024-01-28 12:10:03'
- Can be used on table columns for date manipulation
- Variable Integration
- User-defined variables can be passed to DATEADD()
- Direct date part values (e.g., year) raise errors
- Variables allow passing specific date intervals