user3024635
user3024635

Reputation: 89

How to convert this Oracle statement to T-SQL

How do I convert the below code to T-SQL ?

to_number(to_char(add_months(trunc(SYSDATE),4),'mm'))

Upvotes: 1

Views: 54

Answers (1)

Rodrigo Werlang
Rodrigo Werlang

Reputation: 2176

month(dateadd(MONTH, 4, getdate()))

Test it with SELECT month(dateadd(MONTH, 4, getdate())) and you will have as a result the number of the month (now plus 4)

Upvotes: 1

Related Questions