4
从DateTime小时开始?24小时制
所以我有这个DateTime吗?而我想做的就是获取小时,但以24小时格式显示。 例如: 如果时间是下午2:20:23,我想将其转换为14:20就是这样。 我正在使用Visual C#。有什么想法,谢谢。 我有这样的东西 public static string FormatearHoraA24(DateTime? fechaHora) { if (!fechaHora.HasValue) return ""; string retornar = ""; //here goes what i need }