Sort By Time Of Day

// Sorts input date/time wave by the time of day. NaNs (blanks) go to the end.
// NOTE: This overwrites the input wave.
Function SortByTimeOfDay(w)
    Wave w                  // Date/time wave to be sorted
   
    Duplicate/FREE w, timeOfDay
    timeOfDay = mod(w, 24*60*60)        // timeOfDay now contains just time of day
    Sort {timeOfDay,w}, w           // Sort w by timeOfDay, then by date
End

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More