2
Answers

How to split the date format into month with year?

Rocky Rocky

Rocky Rocky

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