在oracle中:
select to_date(to_char(2007)||'-'||to_char(7)||'-'||to_char(1),'yyyy-mm-dd') from dual;
在sql server中:
convert(datetime,convert(varchar(4),2007)+'-'+convert(varchar(1),7)+'-'+convert(varchar(1),1))
在oracle中:
select to_date(to_char(2007)||'-'||to_char(7)||'-'||to_char(1),'yyyy-mm-dd') from dual;
在sql server中:
convert(datetime,convert(varchar(4),2007)+'-'+convert(varchar(1),7)+'-'+convert(varchar(1),1))