Format will always give output as a string: because 12 hr / 24 hr is not an innate property of a date or time: it is only relevant when presenting the result to the user, or when getting an input from a user. DateTime objects do not care about 12 hr or 24 hour format, because they don't use them: internally they are just a number of milliseconds since an arbitrary fixed point in time.
To format a DateTime as a string with 12 or 24 format, just pass the appropriate format string to DateTime.ToString (or String.Format) - they are listed here:
Formatting a DateTime for display - format string description[
^] - if you don't supply a format specifier then the current system setting is used, which may be 12 or 14 hour, depending on the user preference.