Rocky Rocky

Rocky Rocky

  • NA
  • 317
  • 147.5k

How to split the date format into month with year?

Dec 31 2013 4:30 AM
create table estr

(
custo int,
product varchar(20),
val int,
billed_date datetime
)



insert into estr(custo,product,billed_date,value) values('10','Milk','2013-04-11','2000')

insert into estr(custo,product,billed_date,value) values('10','Milk','2013-04-21','500')

insert into estr(custo,product,billed_date,value) values('10','Milk','2013-05-05','100')

insert into estr(custo,product,billed_date,value) values('10','Milk','2013-05-11','2000')

insert into estr(custo,product,billed_date,value) values('10','fruits','2013-05-11','500')

insert into estr(custo,product,billed_date,value) values('30','fruits','2013-04-11','2000')


insert into estr(custo,product,billed_date,value) values('30','fruits','2013-05-11','1000')

from here i wanna extract the month with year for counting purpose how ll do ?
guide me?

Answers (2)