f=@(c)datestr(c,'HHMM') f('11:34 AM')f('11:34 PM')
Standard input is empty
f = @(c) datestr (c, 'HHMM') ans = 1134 ans = 2334
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!