I have two variables - bed time and wake time. bed time is formulated like: 21_30 and wake time is formulated like 06_30.

Can you advise how I can calculate the duration between those times in stata in minutes? i.e in that example the calculation should be 540 minutes.