Search point number from many waves

How to search the point number from values of many waves?
I found that x2pnt is for one wave only.
I can change the waves to multidimensional wave and the help says that I can use this function

(ScaledDimPos - DimOffset(waveName, dim))/DimDelta(waveName,dim)

I do not understand it. Can you please help me?
So you mean you want a function for one multidimensional wave or do you want to automate stuff for more waves?
I assume you mean the former...

Now, you have a wave, lets say... WAVE myWave
and a position you want the point from... Variable myPosition
Now what x2pnt does is...

x2pnt(myWave, myPosition) => (myPosition - DimOffset(myWave, 0))/DimDelta(myWave,0)

If you want the position for a higher dimension just exchange the '0' with your dimension.

Or use this function if you want:

Function pos2pnt(mywave, pos, dim)
    Wave mywave
    Variable pos, dim
    return (pos - DimOffset(mywave, dim))/DimDelta(mywave, dim)
End


What if the scale property is in term of Date and Time, how to write myPosition?
Date/Time scale is saved internally as 'number of seconds since 1/1/1904'. That means, if you have a date you want to search for, first convert it to this representation (easiest way is the date2secs function):
myPosition = date2secs(year, month, day )