Time stamp conversion Day of Year to Date and Time

Hello,
What is the function used to convert an IGOR time stamp from DOY (Day of Year) with hourly times to "date + time (Hourly)".
I attached an example that starts from Jan 1 2017.
Thanks very much.
DOY_2017.txt
Those numbers are fractional days from the beginning of a year? You could use Date2Secs(2017, 1, 1)+86400*(fractional day). You say it starts with Jan 1, 2017, but the first number is clearly the end of a year. For instance:
make/D/N=(numpnts(DOY)) dates
•dates = Date2Secs(2017, 1, 1)+86400*DOY

The wave DOY was made by copying your text and pasting into an Igor table. In the attached picture of an Igor table, I set the format of the "dates" column by right-clicking and selecting Format->Date and Time.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
TableWithDateData.png
Quote:
What is the function used to convert an IGOR time stamp from DOY (Day of Year) with hourly times to "date + time (Hourly)".


Your file starts like this:
DOY 366.958 1 1.04167 1.08333

None of these are IGOR time stamps. Igor stores date/time values as seconds since 1904-01-01.

It is not clear to me what the meaning of 366.958 is so I will ignore it for now.

Assuming that you have loaded the values in the file starting from "1" into wave0, here are some useful commands:
Edit wave0
Duplicate wave0, wave1
Redimension/D wave1     // Date/time values must be double-precision
SetScale d, 0, 0, "dat", wave1  // "dat" data units tells Igor that the wave contains date/time values
Variable startDateTime = date2secs(2017, 1, 1)
wave1 = FractionalHoursToDateTime(startDateTime, wave0)
AppendToTable wave1


FractionalHoursToDateTime is defined as follows:
Function FractionalHoursToDateTime(startDateTime, fractionalHours)
    Variable startDateTime          // In Igor date/time format (seconds since 1904-01-01)
    Variable fractionalHours
   
    Variable secondsPerHour = 60 * 60
    Variable seconds = fractionalHours * secondsPerHour
    Variable dt = startDateTime + seconds
    return dt   // An Igor date/time value
End



Hello,
Thank you both very much for your replies.

The suggestion of John worked for this case.

The first digit of each row corresponds to the day of year and the remaining digits correspond to the fractional time.

Best regards