1
Answer

Select date problem

Sie Ste

Sie Ste

13y
1.1k
1
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)