Sie Ste

Sie Ste

  • NA
  • 196
  • 184.4k

Select date problem

Dec 8 2011 10:30 PM
In a sql server 2008 r2 database, I am trying to obtain just the date portion of a datetime field in mm/dd/yyyy format. I basically just do not want the time portion of this field.

I have used statements like select MONTH(pay_date) + '/'  + DAY(pay_date) + '/' + YEAR(payment_date) from cust_table. I keep getting errors.

Can  you tell me what is wrong with the above select statement and/or can you show me a different way to obtain only the date in a mm/dd/yyyy format?

Answers (1)