문제

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

I have tried using CDate() but the results are not as expected.

THanks.

도움이 되었습니까?

해결책

I think the following would work, just put your julian date inside the jd variable.

Dim dt as Date 
Dim jd as Long
dt = DateSerial(1900 + Int(jd / 1000), 1, jd Mod 1000)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top