Adddate Sql Code Example


Example: sql server current date minus 5 years

SELECT GETDATE() 'Today',             DATEADD(day,-2,GETDATE()) 'Today - 2 Days' SELECT GETDATE() 'Today',             DATEADD(dd,-2,GETDATE()) 'Today - 2 Days' SELECT GETDATE() 'Today',             DATEADD(d,-2,GETDATE()) 'Today - 2 Days'

Comments

Popular posts from this blog

AspenTech InfoPlus 21 - How To Connect And Query Data

Chemistry - Bond Angles In NH3 And NCl3

Can Not Use Command Telnet In Git Bash