dim newdate as long = DateTime.Add(datevalue1stjanuary, 0, 0, 171)
Sub getDateFromDayNumber (day As Int) As String
DateTime.DateFormat = "yyyy/MM/dd"
Dim yr As Int = DateTime.GetYear(DateTime.Now)
Dim p As Period
p.Days = day - 1
Dim nDate As Long = DateUtils.AddPeriod(DateTime.DateParse($"${yr}/01/01"$),p)
Return DateTime.Date(nDate)
End Sub
Sub getDateFromDayNumber2 (day As Int) As String
DateTime.DateFormat = "yyyy/MM/dd"
Dim yr As Int = DateTime.GetYear(DateTime.Now)
Dim d As String = $"${yr}/01/01"$
Dim nDate As Long = DateTime.Add(DateTime.DateParse(d),0,0,day - 1)
Return DateTime.Date(nDate)
End Sub