hi,
I want to format date in the following code
select Month_date, [100] ,[101],[102],[103]
from(
select t.Month_date,b.bus_id,b.tour_date,b.[status],b.fare from #temp t left outer join Busdetails b on t.Month_date=b.tour_date ) up
pivot (min(status) for bus_id in([100],[101],[102],[103]))
as pvt
order by Month_date
drop table #temp
I want to change this code
select t.Month_date,b.bus_id,b.tour_date,b.[status],b.fare from #temp t left outer join Busdetails b on t.Month_date=b.tour_date ) up
I want to change t.Month_date like
CAST(CONVERT(char(8), month_date, 112) AS datetime) date
I tried this but showing error.
Regards
Baiju