VB6 Julian Date String to Date Object

Is there a function in Visual Basic 6 that can be used to convert a julian date string ( January 99001-1st 1999 ) to an object Date?

I tried to use CDate(), but the results are not as expected.

THANKS.

+3
source share
1 answer

I think the following will work, just enter your Julian date in the jd variable.

Dim dt as Date 
Dim jd as Long
dt = DateSerial(1900 + Int(jd / 1000), 1, jd Mod 1000)
+4
source

Source: https://habr.com/ru/post/1786113/


All Articles