• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

T-SQL convertion

Dear all,

We have an oracle statement here and this will will execute in MS SQL side.

"to_date('2013-04-01','YYYY-MM-DD') and to_date('2013-05-10','YYYY-MM-DD')"

but I try to run it from MS SQL and see what takes it so long time to return.

how can I convert it to t-SQL ?
0
marrowyung
Asked:
marrowyung
  • 2
1 Solution
 
PortletPaulfreelancerCommented:
between '2013-04-01' and '2013-05-10'

is all you need in TSQL
0
 
PortletPaulfreelancerCommented:
I should add, if you prefer to be explicit regarding the date conversion, then you can do this instead:

between convert(date,'2013-04-01') and convert(date,'2013-05-10')

-- not sure about sql 2005, will work in 2008
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now