I have created a field of type datetime. I want to display this in YYYY/M/D format
example
date 09/09/2014 to display as 2014/9/9
Also I need display a time field [Time_Orde] in this format 2:43:14 PM
I use SQL server 2008
I have tried the function
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
My code:
SELECT CONVERT(date,Order_Date) from Orders_Teakeaway
But I could not get this format 2014/9/9