Forum Discussion
Anonymous
9 years agoNot applicable
SQL - date range from today until 3 months from now
Hello, Sorry if this isnt the best forum to ask this, but Im digging into a SQL data warehouse, which uses a date field. The data is populated from 2004 onwards, but I only want to pull the event d...
- 9 years ago
From a purely SQL perspective, you want to use
getdate()
to get the current date/time (convert with a mask to eliminate time if necessary)
and
dateadd(month, 3, getdate())
to get the date 3 months from now (use same convert mask if needed).
dedelman_clng
9 years agoCommunity Champion
From a purely SQL perspective, you want to use
getdate()
to get the current date/time (convert with a mask to eliminate time if necessary)
and
dateadd(month, 3, getdate())
to get the date 3 months from now (use same convert mask if needed).