SQL SERVER:
use task
create table date
(Startdate date,
Enddate date)
insert into date values('2013-01-01',GETDATE())
select * from date
select *,DATEDIFF(MONTH,Startdate,Enddate) as diffdate from date
use task
create table date
(Startdate date,
Enddate date)
insert into date values('2013-01-01',GETDATE())
select * from date
select *,DATEDIFF(MONTH,Startdate,Enddate) as diffdate from date
No comments:
Post a Comment