This is my technical area for troubleshooting and learning new programming skills and much more. Here, you will find answers on a wide range of technologies such as AI, Machine Learning, OpenAI, Databricks, ASP.NET, C#, Python, Microsoft Access, MySQL, Amazon Web Services, SQL Server, PL/SQL, JD Edwards, SAS, Salesforce, APIs, MVC, and many others. Please feel free to visit and join the discussion!
Thursday, March 30, 2017
Convert Julian date to Calendar date PL SQL Oracle
select YADOB DOB,
CASE
when YADOB = 0 Then TO_CHAR(TO_DATE(SUBSTR (YADOB,2,5),'YYDDD'),'YYYY-MM-DD')
when YADOB < 100000 Then TO_CHAR(TO_DATE(YADOB+1900000, 'YYDDD'), 'MM/DD/YYYY')
when YADOB > 100000 Then TO_CHAR(TO_DATE(YADOB+1900000, 'YYDDD'), 'MM/DD/YYYY')
ELSE '0' end JulianDT
from proddta.F060116
By Shyamini Nair
Subscribe to:
Posts (Atom)