By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
The example below uses Today, but any valid date object will work.
Dim dt As New notesdatetime(Today)
Dim x As Long, y As Long
'Get the correct julian day
x& = Datenumber(Year(dt.localtime),Month(dt.Localtime),Day(dt.LocalTime))
y& = Datenumber(Year(dt.localtime),1,1)
tdif = Trim(Str((x& - y&) + 1))
threedigit = Right("000",3-Len(tdif)) + tdif ' Pad julian date with 0's
Msgbox "Today's julian date is: " + threedigit