Convert Julian dates in Normal date

Vineet S 770 Reputation points
2024-09-19T18:36:21.3566667+00:00

How to convert Julian date column in normal date like colum contains 12490,12492 Julian dates

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,690 questions
SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,567 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,626 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 64,566 Reputation points
    2024-09-19T22:50:15.0466667+00:00

    simple expression:

    declare @j int = 24263; -- 2024-09-19 in Julian
    select  dateadd(dy, (@j % 1000) - 1, dateadd(yy, @j/1000, cast('2000-01-01' as date)))
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.