for example I have a square wave say 0 to 12 volts dc , pulse width modulated , I want to see the duty cycle. this is not 100 percent .
Regardless of the nitpicking I understand what you want.
If it is a DC rectangular signal then the duty cycle is the average value divided by the peak value.
If the peak value can be read directly, say at the battery, then there you have it. If it cannot be read directly then you would need a circuit that would measure it. Do you have access to the voltage as DC and before it is chopped up? Is that voltage very stable so we can assume it is always 12 volts? Or is it something between 10 and 14? Because that changes things.
If the multimeter reads average value then just divide the average by the peak and that will give you the duty cycle (between zero and one). Analog (needle) meters would measure average value but the AC scale con be printed to read sine RMS or whatever. Check to see what your meter reads. Take a 12 volt DC and chop it at 50% duty cycle. The average is 6 V. What does your meter read?
If this is for occasional measuring then that would work. If it is for something frequently used and you want something quick and fast then you could easily build a meter which would directly indicate duty cycle (between zero and one) which I do not think simple multimeters would do.