none
Juliana date

    Question

  • I've got a question about Juliana Date in SQL Server 2008 R2.

    when I convert Julian date to Gregorian Date, My system show the follow date 2014-09-29 but, I was testing in others machine (3) and the result change, this is 2014-09-30, this is the same in new machines. the zone time is same for all machine.

    What is the reason for the different date?


    Wednesday, August 21, 2013 3:11 PM

All replies

  • Hi Jovez,

    We need to verify if you define the function of converting Julian date to Gregorian date, then convert the Julian date. Or you perform the following T-SQL statement to convert date in all machines. Also we need to confirm you type the same Julian date in SQL Server . 

    For example, the Julian date is 109060, you can run them to convert date.

    DECLARE @jdate int  
    SET @jdate = 109060
    select dateadd(dd, (@jdate - ((@jdate/1000) * 1000)) - 1, dateadd(yy, @jdate/1000, 0))
    Thanks,
    Sofiya Li


    Sofiya Li
    TechNet Community Support


    Thursday, August 22, 2013 6:26 AM
    Moderator