Wave scaling
seboshea
I've got what should only be a simple problem, but can't find any help.
My waves are measurements and there x scaling gives the time and date that they were taken, is there any code that will return the time and date from the x scaling for a particular point number?
Cheers
If you want the date/time in Igor date/time format (seconds since January 1, 1904):
If you want the date/time as a string:
String dateStr = Secs2Date(dt,-2)
String timeStr = Secs2Time(dt,3)
Print dateStr, timeStr
For example:
SetScale/P x, Date2Secs(2011, 06, 28), 60*60*12, wave0 // Set X scaling
Variable dt = pnt2x(wave0,0) // Igor date/time for point 0 of wave0
String dateStr = Secs2Date(dt,-2)
String timeStr = Secs2Time(dt,3)
Print dateStr, timeStr
dt = pnt2x(wave0,1) // Igor date/time for point 1 of wave0
dateStr = Secs2Date(dt,-2)
timeStr = Secs2Time(dt,3)
Print dateStr, timeStr
June 28, 2011 at 11:39 am - Permalink