Monday, November 14, 2016

Convert Oracle date to int using native Microsoft date

SQL Server/Excel

select getdate() 'Today',convert(int,getdate())

2016-11-14 16:05:35.207 42687

Oracle

select current_date,cast(current_date - date '1900-01-01' as int)
from dual;

14-NOV-16 42687

No comments:

Post a Comment