MATLAB: Date format – need HHMM as 2400 instead of 0000

datetimeformat

Dear Matlab community,
I'm formatting dates for a USACE HEC-HMS application that requires next day datetimes as HHMM 2400 instead of 0000. For example:
t1 = datetime(2013,9,8,23,0,0); % Start Date/time (yyyy,mm,dd,hh,mm,ss)
t2 = datetime(2013,9,9,1,0,0); % End Date/time (yyyy,mm,dd,hh,mm,ss)
t = t1:hours(1):t2; % 1 hour intervals
datetime matrix 't' produces "09-Sep-2013 00:00:00" in column 2 and I would like it to produce "08-Sep-2013 24:00:00".
Is this possible?
Any help would be greatly appreciated.
Thanks,
-Chris

Best Answer

I doubt the datetime data type will let you. When I tried it, it converted 24 to 0.